i've discovered by accident that if you're lucky enough to have the right kind of engine and mechanics, then an older car makes more financial sense as well.
the average monthly payment for a car is around $800, and if you have the right kind of engine -- one where transmissions and head units are the most costly repairs, like nearly all did before the early 2010's -- then the worst case scenario is $3000, which is less than 4 months of payments.
but the caveat is that you have to know the right mechanics, since specialty shops like aamco dramatically inflate their prices. they wanted $7500 to replace the transmission on my 2008 and i found mechanics willing to do it for $1800 back in 2023.
and there are plenty of these mechanics around -- i've used four of them on 3 different cars since 2003. the trick is knowing who they are, since they're usually operating out of small mom & pop shops that keep bankers hours, so they're MUCH more inconvenient and harder to find than something like aamco.