let me share MY plan, it's pretty obvious, your mileage may vary:
(1) preparation ( study the combined knowledge of the "Financial Independence/Retire Early"[1] communities ):
- while you have a good paying job, live below your pay grade, and invest the saved money ( i call it "a couch of tranquility" )
- keep an eye on the tech market ( it's global, you know, right ? ) and stay sharp with the skills on demand most often. Tech jobs can be translated between companies much easier than administrative/coordination/managerial jobs
- get yourself into any of the online contractor networks[2] around, now, and put it "on hold for new offers"; so if need arises, the bureaucracy is already taken care of ( but be warned, it's a "race to the bottom" on hourly rates... )
- keep a nice, large as possible, and thriving network of former colleagues you have worked with in the past. Reach, say an occasional "hello". Try to offer help to them as often as possible, soon it might be your turn to ask for help...
- keep an online portfolio of pet projects ( github/gitlab/bitbucket/whatever ) try to keep it nifty and clean, so any possible recruiter can find it, and publish it alongside your linkedin profile. Publishing an occasional linkedin article will not hurt, either
- keep your "ear on the ground", talk with your colleagues on your current job, so you might notice the dark clouds of downsizing approaching. Don't stay coding in your cave, away from the "corridor gossip" ( even if "the corridor" is just a slack channel ). Notice i said: "ear on the ground", not "mouth on the loudspeaker", be discreet.
- make sure you have a decent ( portable, preferrably ) personal machine, so you can still take work, if your main machine belongs to your current employer, and you will have to return it...
(2) action. When the dark days of downsizing come ( and they will come.... ) upon you
- you should be able to smell the "blood in water" sooner than most, but still, your savings will buy you time; hell, if it is properly invested, it can buy you a lot of time, to keep your head out of water and survey your options
- if necessary, you can move to a cheaper neighborhood/city even country; to stretch these savings much longer ( in case of moving countries, it's a whole different story, check the "digital nomad"[3] forums )
- which skills are still in demand ? which people in your network "owe" you ? which companies ( remember herbert mcluhan: it's a global village, more than ever ) are still hiring ? All of these answers should be easier if your preparation was ok
- how big of a pay cut you can afford, to not to deplete your savings too soon ? keep on taking contractor jobs while a full time job is too hard to come by. And try to keep living below your pay grade, so you can keep saving money...
( yes, i know, it's demanding... )
---
[1] just an example: https://www.reddit.com/r/Fire/
[2] https://flexiple.com/developers/toptal-alternatives/
[3] https://nomadgirl.co/digital-nomad-reddit-channels/