I look at maintenance schedules and talk to mechanics when making those kind of decisions.
I usually make a decision at the time that I buy a car how long I will plan to keep it, what I think it's useful life will be. I always pay cash for cars (although I might fiancé for an incentive and pay it off right away), so part of my expectations for useful life are based on when I'll have enough in my car fund (put money in from each paycheck) to replace the car.
Once the car has served it's useful life, and I have the money to replace it, then when I see high maintenance coming I know it's time to say goodbye. This just happened to me with my 2004 Honda Odyssey. My plan was to drive it for 10 years or 200,000 miles whichever came first and to dump it before putting in a second expensive replacement timing belt. Well as of May I had had it for 10 years and miles were at 165,000 miles. I wanted a larger family vehicle replacement, but with car pooling days over I was not planning or funding a replacement mini van, meant I didn't have to be putting as much money aside as I would have otherwise. My replacement car fund had 22,000 in it to replace the car at that point too (enough for a new loaded compact car or a more basic model late model sedan or SUV). We had a small ding on the bumper that didn't look bad that I chose not to repair (it has been there for the last four years), as it would have been $800 out of pocket (I carry a $1000 deductible) and I couldn't see spending that much, and then I just found out two weeks ago that there is some dry rot in the suspension (repair of about $600 that should occur in the next few months and some dry rot in the tires (about $600 to replace), and that made it a no brainer to me that it was time to replace the car. Anyway I just got a used 2014 Murano with about 20,000 miles from Enterprise Car sales as a replacement, and they gave me Kelly Blue Book dealer trade in value for the Odyssey. My current plan too, is to if it works out drive the Murano till 2024 or so, putting replacement dollars into my car fund monthly too. // Cars can last forever if you keep putting money into them, so for me it's how long I want to keep doing that vs. putting money instead into something newer.