That's almost never true. Even a new engine and trans can be done for like 10k. New comparable F150 is easily 60k+.
It's hard to do the math with Ford/Chev/Dodge junk because the new ones break a lot, same as the old ones, LOL. Ask me how I know.
However, with my Toyotas (and probably Hondas and Nissans and Suzukis and so on), once they need a $5 to $10k something, I do the math over the long haul, not the short term.
Last one was a 1999 Tacoma, needed about $7k in work (maybe $1500 if I could do my own work and just bought parts, but I can't). That 7k would buy me about 15,000 miles before the timing chain had to get done again. A (at the time) $30k new Toyota would get me 120 to 180k miles before the first major bill.
$7000 / 15000 = $0.46 ish a mile.
$30000 / 120,000 = $0.25 a mile (and I'll honestly be shocked if I don't get 180k or more on the new one before it gets there).
Oh, and I sold the 1999 Tacoma to a guy who could do his own work for $7500 (after paying $8500 for it 10 years earlier), and all I ever did to it was regular maintenance and replaced an alternator once, while driving it around 130k miles. So I spent less than a penny per mile at the end of it all.
So, sure, a guy has gotta have or borrow the money to play that game, but at the end of my life, I spend around half as much to drive a mile by driving a newer vehicle vs an older one. And I spend a lot less time and headache getting the trucks fixed (as in, basically none).
It's one of life's hidden secrets for how not to waste money on transportation.
YMMV.