Saving "A few 100k" is one solution, probably for the American FAANG (or equivalent) engineers. But there are other solutions.
Frugality helps - less money is required if you live in a shared house or a couch (you can invest in property at the same time but not live in it).
Having a life partner helps, one of you can have a job at all times, so one of you has the FU card.
Other sources of income. I think coding side projects are hard to make work, but real estate is more doable (but there is more risk and patience required).
Even with none of that, a good CV, interviewing technique, keeping up with the interview puzzles, and living somewhere with plenty of jobs will give you a FU card to your current company (but not the industry).