It's time when you find you're spending more time under it than in it.
That!
Funny, but true.
Mine is 2005 - 13 y.o. - 241,000 miles. I've already decided to replace it with a factory order, but waiting until 1) the second model year (2020s) of this new generation comes out and 2) they produce the exact combo that I want (Laramie Quad w/6foot bed and RamBox).
Over its long life i've replaced probably all the sensors - some more than once - and numerous DIY parts (rad, H2O pump, etc) but for me the death knell was when I saw bubble-up-from-under type body rust. Granted, I "could" keep it a whole 'nother decade, probably, but while I don't mind driving a dented old thing I really don't want to be "that guy" who always shows up in the bondo-mobile, either. Besides the rust, probably for me (like you!) the critical mass in the decision to replace was the RATE of increase of broken stuff. Seems that within the past year and a half I've needed to replace a steering knuckle, pinion, most of the suspension (upper/lower control arms, sway bar links, etc)... Now one of the O2 sensors was jammed and I stripped its threads changing it and the new one sits ****-eyed in the **** and that's giving false readings which is causing the engine to stutter upon throttle changes...
Granted: I coulda done bushings instead of the actual control arm, and i coulda had a pro do the O2 sensor so I wouldn't break it, so a lot of the degeneration I have is "my fault". But still, the pinion dying, the water pump failing, other parts... all coming at an increased rate of occurrence to each other. Most lately now I'm looking at routine tire and brakes replacement, but I'm even holding off on those because I'm thinking of replacing.
I'm at a point now where I'm trying to stretch out the last remaining life of the truck without sinking any more money into it, but my not sinking any more money into it is accelerating its demise. A vicious circle of decision/indecision and deteriorating useful life.