I also work in a big tech company. We had bunch of layoffs, some based on performance (which often was a lie), some random. In all instances, the company made a lot of money and kept hiring at a high pace.
At that stage, I know I'll be laid off eventually for one reason or another, I just don't know when. My partner tells me that I should quit on my own terms so I'm not depressed when it happens. But my salary is very competitive, and I'll get severance too. Still, I fear this moment and it's really hard to feel invested in the company. If it wasn't for my colleagues, I think I'd be slacking, waiting for my time.