Now, it seems your concerns are anchored on employment and not anything regarding technology. I have been laid off during my career and survived many layoffs. The first round of layoffs I experienced in the big brand web world was the same year I received a negative review. I kept my job while other highly rated people were pushed out the door.
Here is my learning about career sustainability:
* If you don't like what you do then all you are doing is funding a life style. If you both hate what you do AND do not have a shit ton of personal disposable income sitting in a bank account after 5 years its not worth it. Tell them to fuck off, take a hit to your income/lifestyle and do something else. You will thank me later. This one piece of advice will add years to your life.
* If you want to have a job that withstands all layoffs (aside from the business completely folding) do what is most needed. In my case I was a first year front end developer at Travelocity back in 2008 when the market crashed and before massive frameworks did your job for you. They couldn't hire front end developers to save their life. Its just like now in that most of the candidates were extremely childish or extremely incompetent, but now businesses looks the other way while colossal frameworks and tool sets do most of the work. I kept my job when others didn't because I was more valuable to the business, even with a shit annual review, than people who were cherished employees.
* If you want to be taken seriously on the job do only two things well: 1) guard your time and 2) take care of people. Be ruthless about these two things. If you spend 4 hours a week actually doing your job and the coworker next to you spends 40 hours a week doing their job you are 10x more valuable. This is counter-intuitive because they are working hard you aren't doing shit. Hard work is not valued. Delivery is valued. If you want hard work to be valued then get out of IT and becoming an independent contractor of a trade skill. If you are a narcissist your more competent peers will see through your bullshit. Seriously, learn to take care of people.
* If you want to get promoted do only three things well: 1) deliver what your boss asks of you, 2) measure things, and 3) demonstrate superior communication and organizational skills. I have seen this work in the corporate world and I have heard these exact things more than once from brigadier generals in the US Army.