I largely agree with what you say for generic CS skills. A way to accumulate leverage might be focusing on hard and deep skills like distributed computing and machine learning for complex real-world problems. Although details change significantly over time, the fundamentals evolve much more slowly and take years to truly understand and be able to apply them effectively.
Alternatively, moving into technical management with deep domain knowledge might be suitable for some.
Machine learning effectively didn't exist a decade ago. A decade from now, it's likely to be where building HTML pages was in the nineties, or database-backed web applications in the 00's.
I understand it's a deeper skill set, but depth has little to do with supply-and-demand. Physics, biology, and similar have a lot of depth, and the fundamentals evolve much more slowly and take years to truly understand and be able to apply them effectively as well, but employment prospects are grim.
If blockchain had turned out to be the Next Big Thing, the important fundamentals would have been in cryptography. And so on. Someone young, without family, mortgage, etc. obligations, will be able to get into the current hot field much more quickly than a 40-year-old or 50-year-old with three kids in school and possibly starting medical problems.
It doesn't help that there is massive age discrimination.
If you want to be employed older, the trick seems to be to move into a cross-disciplinary role, such as management (people+tech). A lot of other cross-disciplinary roles will do, though (medicine+tech, bio+tech, chemistry+tech, EE+tech, etc.). Pure tech doesn't seem to cut it after thirty for career growth, after forty for job stability, or after fifty for having a job at all.
Machine learning has been applicable to businesses since the late 90's and early 00's (e.g. recommendation engines, basic speech recognition for people with special needs) and existed as a research field decades earlier.
The star researchers who command top compensation in the field today often have over a decade of experience.
I agree that a much larger pool of graduates might dampen average compensation in the future somewhat. A key distinguishing feature of these more complex skills (relative to HTML, etc) is that much fewer percentage of people are capable of mastering them, and it takes longer commitment as well.
Relative to pure physics and biology, the applications are much broader and thus better prospects for the experts.
Do senior petroleum engineers face the career issues you suggest?
I’m 40, all my significant career growth was after 30 with most of it after 35, I’m more employable now than I was 3 years ago and am paid well. I was really worried about a Logan’s Run-esque slaughter at 40 and I’m not seeing it, with the usual caveats on luck and anecdotes. I do believe there is intense ageism in our industry but I think it may be endemic to certain areas or companies. Don’t fear the reaper my friends, you can be 40 with a family and still work in high profile tech, probably.
Alternatively, moving into technical management with deep domain knowledge might be suitable for some.