In 25 years they'll still have 25-30 years of work left in their lives, and by then most of them won't have received any significant reschooling, and they will still be competing in a tech world, where 10 years ago there wasn't a thing called smartphones.
Some of them will do just fine. I know a lot of old programmers, but I also know a lot of former older IT employees who are spending their 60ies in the unemployment lines.
Moral of the story:
Be an Engineer, not a Programmer.
Be Valuable, not Replaceable.
If you don't care about having a wife or kids you can easily retire forever after 10-15 years of work in SV or NYC.
(I could go on for a while here)
It's not only perfectly possible, it's not particularly difficult.
In 10-15 years in SV/NY you can earn $1MM after tax + growth and then move to a lower COL city/town and take it easy.
I'm living in a studio, have a parking spot, walk to work and go out with my coworkers/friends after work.
What am I missing out on?
NYC is even worse - lop another thousand off and pay even more to live.
Then, if you invest $46k a year for 15 years at a real return of 4% you end up with ~$943k in present day dollars which is right around what the parent was saying.
Not to mention $140k total compensation is relatively low for a senior dev in SF/NYC, you will likely be making a lot more 10 years in.
You can definitely sock away enough even without a 4% rate of growth to put away $1MM of after-tax money in 10-15 years, if you're smart with your money.
I've worked in public service all my life and I took a master degree in business and leadership which was paid by my employeer. Which moved me from engineering to management.
When I see my old study buddies, who all work privately, none of them have gotten any form of reeducation and very few have kept up with the tech.
I'm sure most of them could learn the new buzzwords if they wanted to, but who would hire them until they do when you could simply pick a fresh candidate with newer CS knowledge, all the buzz and a lower pay requirement?