For context, I’m 45, but was an “expert beginner” staying at one company for over a decade before I took my career seriously a little over a decade ago. I also don’t live on the west coast where both salaries and the cost of living are both far beyond normal.
My experience from being in the job market frequently, watching trends, talking to people in the industry locally and recruiters, is that it doesn’t take more than about 10 years to reach your salary peak as an individual contributor or even as a hands on team lead/architect no matter what “technology” you learn. Not saying that’s a bad thing. I’ll take more money if it is given to me, but that’s not really what I am optimizing for.
What I am optimizing for is to stay current with the trends and to know enough technology that is on the “Slope of Enlightenment” phase of the Hype Cycle. I’m doing that by making sure that I am both working for companies that are not using outdated or unmarketable tech and doing resume driven development. At 45, I can’t afford to be an out of touch old guy and then start whining about “ageism”. That’s good enough to get the “right now job”. Meaning if I need a job now I can email some recruiters and have another job within less than a month as a bog standard Enterprise CRUD Developer/Architect.
On the other hand, if you just focus on “technology” you’re a commodity. There are thousands of people who know “technology”. You can get a job quickly but it won’t pay that much above median.
Focus on architecture and how to deliver business value. I know plenty of “smart people(tm)” who can’t deliver code that makes money or saves money worth crap. This is the key to negotiating your way out of being another commodity developer.
Although to make a lot of money, knowing technology that is on the “Peak of Inflated Expectation” may help you to overcharge as a high price consultant by going after VC funded companies with no business plan and plenty of access to money. The best way to make money during a gold rush is by selling shovels. Right now, for me, that focus is “cloud consulting” or being a “Digital Transformation Consultant”. When and if that starts trending to the “trough of disillusionment”, I can always fall back to development.