Not saying this will definitely happen, but it's a risk, and you don't need to be a ladder-climber to protect against it.
I think most people would probably do better if they just stopped allowing their expenses to grow with their income, and saved and invested more, both in equities and in forms of passive income (like rental real estate). That way, not only are you insulated from shifts in the industry around your primary employment, but you can also probably retire early.
To me, the real perk of working in tech is not that there are so many jobs that I can find one that pays incredibly well; it's that I can find one that pays nicely but aside from that has some other perks.
A lot of friends and workmates have told me that I could be working in a better paying place. After looking into quite a few job offers, my conclusion is that for now I'll stay in my 8-to-4 job that pays me twice as much as the average in my area (average in the sense of all the population, not just tech jobs, obviously). I used to have a high-paying, high-stress job; I don't want to go back to that, it's not worth the money.
I must add that I'm EU-based. I understand that in the US, with much less of a safety net, maybe optimizing for money is a more attractive idea. I can't really say for sure.
For example: I've spent a large chunk of my free time over the last few months learning how to typeset signs in fansubs and make them look good, something that has no economic utility whatsoever, but makes me really happy when I typeset something that looks good. Yeah, sure, I could have spent that time furthering my career by developing a marketable tech skill, writing tools for my company on my own time to impress management, or writing an open-source piece of software to pad my GitHub portfolio, but I'd rather do something fun for myself than do any of those.
Not everyone's a climber, and being in "a dead-end job" isn't really a bad thing if you're not ambitious.
I'd just like to spread the message that it is absolutely OK to plateau. You don't need to be a renowned domain expert, you don't need to go into management, you don't need to start your own company... if you're happy where you are, don't sweat it.