As a 30-year car enthusiast, the brands I would pick purely for long-term reliabilty are Honda/Acura and Toyota/Lexus. Mazda, Subaru, and Nissan/Infiniti all take second place to Honda and Toyota, although I’ve owned 3 Mazdas and have been very happy with them. The most noticeable difference is that with a Mazda or Nissan, things will start to feel “off” after 70-80k miles. Niggling little problems will appear – an LED display gets wonky, a gear grinds sometimes, etc. A Toyota will feel, sound, and drive EXACTLY the way it did when you drove it off the lot. This is coming from someone who had to lemon law a Toyota truck (on average they are great).
If my life depended on a car lasting 200k miles and having very few problems getting there, I’d buy a Toyota, one that isn’t the first year for the model. If my life depended on pure performance and impressing friends with the fit and finish, I’d buy German. If you put a gun to my head, I wouldn’t buy American. I rent them periodically, and they are always astoundingly bad ergonomically and in materials quality.
The maintenance costs of an older car may not equal the cost of a new car, but there’s a lot to be said for peace of mind.