I've had friends at FAANG companies get FOMO and quit, then come back within a year because the grass was browner. They've taken a comp hit in the process, but still made a firehose of money like anyone at a FAANG. People love to complain about relative inequalities without fully appreciating how good of a situation they have within society, so actually trying new jobs once in a while can be healthy and eye opening.
I've been fortunate enough to always leave companies on good terms while generally happy there. I've left for exciting new projects and challenges, rather than for compensation. Part of that is I try to be an agent for change when there's something I am frustrated with. I've also always given several months notice. I also have the mentality of committing to something for at least three years.
I haven't stressed out about compensation. I've always negotiated aggressively before accepting a job offer, and then just not worried about it. I've leaned toward equity over salary, and found that my salary naturally increased over time to stay competitive anyway. I have a reputation for being straight forward, honest and reliable, and that's paid off more than any negotiation or job change. I would have probably been the wealthiest today if I stayed at my first job, making a relatively comically low salary, but I wouldn't be as good of an engineer.