Ancient Wisdom has always had it that the men who can manage men manage the men who can manage only tools, and the men who can manage money manage everybody.
That's why the bankers survived the downfall of every empire. From the Medici to the Rothschilds to the Morgans.
If you are looking for job stability, don't take highly technical roles. Start planning to be management from day one. Take the jobs where you get people do do the work and not the jobs where you do the work.
Gave my sister (a software developer) this advice over two decades ago