You can keep a vehicle on the road for a very long time if you keep replacing parts when they need it including the engine and transmission.
I know trucks still on the road that are over 40 years old and some even still have the same engine and transmission in them while others have had the engine and transmission replaced over that time period.
You have to decide though whether the vehicle is worth the replacement cost of the needed parts or not.
But to be honest I'd rather put another transmission and engine in my current paid for truck then have any other payments on another truck.
For around $3,000.00 I can put a new Transmission and engine in my truck when needed and keep it on the road.
That's a lot better than financing the cost of a new truck and shelling out all those payment each month and the cost of the transmission and engine would usually cost just the amount that would be due at the signing of the loan for the new truck.