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.