Well, you asked two questions.
When to trade up? There's no real good answer for that. I wish I had traded up my 2004 Suburban before the transmission grenaded (for the second time) 30 miles East of Vernal, UT while on a camping trip. That not only cost me $3500 for a new transmission, it also cost me two extra vacation days and probably $300 in additional food and lodging expenses (at a KOA campground while they fixed the transmission.)
On the other hand, the 'Burb was paid for so that was additional $$ in my pocket every month.
Of course, if you trade before you have a major failure, you'll always be wondering if that old truck could have 'gone the distance.'
Depending on your specific vehicle there might be a "middle option" too: For a lot less than the cost of a new vehicle you can often get a pretty comprehensive extended warranty. The extended warranty does have an up-front cost but it means that expensive repairs will be covered.
With my 2018 F-150 currently sitting at 53,000 miles, I was approaching the end of my 5/60 power train warranty. Given the crazy prices of new and used vehicles, I decided to bite the bullet and get an extended warranty for 4 years/50,000 miles, which should take me through to 2026 and 100k miles. By then I'm sure I'll be ready for a different vehicle.
Second question, WRT the "commuter vehicle." When my office moved from downtown (where I rode the light rail) to the suburbs in 2011, I was driving a 4runner and thought it would be smart to have a cheap commuter car. I bought a 1997 Mazda Protege sedan for $900. It was OK (and got 35+ MPG) but it smoked like crazy and after just over a year I ended up putting a replacement engine in it for around $2200. It ran great and my total investment was still around $3k but I'm not sure I'd do it again.
In my case, my commute was only about 25 miles each day (12.5 one way) or 125 miles a week. Obviously one plus of having the cheap commuter car was that it was also good for running around town and NOT putting miles on my 4runner. But with such a relatively short commute, having the second car undoubtedly COST me more money than it saved.
The longer the commute, the more sense the second car makes, but crunch the numbers honestly: Calculate ALL of the costs of having a second car: Purchase cost, insurance, maintenance, depreciation. Unless you have a VERY long commute, or unless your "main" vehicle gets terrible MPG the 'commuter car' may not be a good buy financially.
Currently working from home full time so there's no point in having any kind of commuter car for me. I do sometimes think that when it's time to replace my wife's CR-V we should either get a hybrid or a full electric car. That car rarely goes out of town so an electric would actually make sense.