Everything that was valuable in 2001 is still of about the same value now. But the mechanics who didn't want to diagnose electronics and the accountants who refused to learn computers and the programmers who only wanna write php have seen their skills reduced in value because they did not maintain currency.
Being responsible for the work output of other people and doing your job somewhere unpleasant or dangerous pretty much always increases your pay.
I've been regularly asked by my employer to change role to help some other part of the business. Whether it was switching from mobile to server, server to front end web, or switching frameworks / tools within those domains, I always made the switch.
The problem is that now I'm a jack of all trades, and a master of none.
“I’m a master generlized problem solving machine, how can I be of service?”
If you're the jack of all trades guy, you'll always be asked to cleanup, or take care of small feature requests. When the company needs the big guns for a mission critical feature, you will never be called.
This is an important point for people to realize. There's risks at specializing for sure, but there's also a lot of risk to being a jack of all trade.
Granted i climbed the ladder in mid size non-hot companies so may not be applicable.
Im currently a consultant in my trade and I appear to sell this ONE thing but in every case i end up solving problems as a generilist.
Is there a chance that you can claim that you are already an expert in one the things you do? sometimes other people’s bar for expertise is lower than yours.
It might also be considered a "soft skill", but there are some communication skills I think are really valuable in a technical space; like knowing which diagram to make which will most effectively summarize the complexity of your system and is appropriate for your audience. The tools for constructing that drawing will change, but the activity of sketching for communication isn't going anywhere.
My evidence is that we still have a lot of legacy and technical debt around, and it's likely to still be there in 20 years, so even if you don't work on the cutting edge (which may now have stratospheric requirements for entry like a PhD and Github projects and 8 rounds of interviews), you can still take legacy work.
Security and defense (physical and IT/software) will also likely be around forever.
Maybe the demand will increase fast enough to keep salaries from dropping in real terms.