Tough question to answer, it really depends on how you live. Just like with cars, you can see people out there with 40 year old trailers that do a lot of maintenance, and there are others that trade for a new one every 5 years.
There's not much in them that isn't repairable as long as you're willing to make them.
Only you can decide when it's time to stop putting money into it.
Edited to add:
I've been in my current coach fulltime for about 3 years, not a long time by some standards, but I can easily foresee it lasting another 5 with proper maintenance. In all likelihood, I'll probably ending up trading it for something larger or smaller before it is worn out. Before that, I was in a 5th wheel fulltime for 5 years. It wasn't worn out, but I wanted a class A rather than pulling a trailer.