I don't think anything can prepare you for an entire, sudden collapse. If the world software biz goes full quantum programming, qubits and all, in the span of a few days, I'm screwed. But if I get canned from my job as a dev, that work I put into learning a few algorithms, scaling on AWS, and some marketable programming language will give me a fighting chance. If I were a MUMPS programmer who had never used version control in my 20 year run in some job and I'd never learned JavaScript, losing my job would be traumatic.