I learned about "cog in the machine" a few years after starting in tech and I became a contractor and have been ever since (20+ years). I get paid a daily rate and as long as there is work I keep earning, no sick/holiday pay, no reviews, bs corporate networking for promotions etc.

I have zero job security and could be let go any time, but that's built into my rate and I realised that's the case for normal employees anyway as the OP has discovered to his horror. The funny thing is I have outlived many a "permanent" employee in some places I've worked.