BIG SIMPLIFICATIONS AHEAD
There are a lot of new software engineers popping up all the time, but very few ever reach a "senior" change, and a lot of them end up producing unmaintainable systems at companies, that sooner or later crumble. All at the same time, demand for good software engineers is growing and growing.
There are also an interesting effect I'm starting to see more often (in Berlin), that due to combination of high salaries and moderate living costs, which make saving up money possible, qualified engineers are (partially) leaving the workforce quite early, either by dropping to part-time or retiring early. This then further lowers the available supply, making salaries even higher, and it even easier to save up money. More of a hunch than a big observable effect right now, but I'm very interested in seeing how that plays out over the coming years.
And yet many of them still get the 'senior' title and role, and still end up producing unmaintainable systems. I've had to clean up after quite a few.
If you're in your mid 30s now, and are already making $300k+ (very doable if you're skilled and work for an established company), I don't see why you couldn't retire by the time you're 50 with $2M+ in the bank. Even if you choose not to retire fully, even taking jobs that drastically cut your income to under $100k a year should net you a very comfortable retirement with a nice buffer. Just don't buy a house in San Francisco.