my 2cents: when you feel you are being used, and don't feel you have the disposition to confront your abuser, just start making (intentional) mistakes.
If your "mistakes" cause enough trouble to the abuser, (s)he will leave you alone.
welcome to corporate world, AKA the meat grinder.... it's all about: "just because you( your work, actually ) are necessary, doesn't mean you ( your work ) are important".
Just collect the checks ( i hope they are fat ) and "go through the motions".
By the time you grow really sick of everything, let's hope you have saved/invested enough money to be really close to (early) retirement.
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...
no simple answer, hence my suggestion to check the FIRE communities; it depends entirely on where you are and the current markets...
in my case ( over 48 y.o., divorced, living in brazil ) nowadays most of my investments are in treasure bonds, real estate ( REITs, actually ) and commodities; with very few shares.
I also have traded options a lot in the past with moderate success; but with a full time job i don't have the necessary time anymore.