There is no avoiding the boom/bust cycle. Ride the boom, extract all you can, be frugal. When the bust comes, use your cushion to ride it out.
It is true that not everybody gets laid off in the bust. It is also true that smart, diligent and hardworking people are let go like everybody else. Don't plan to keep your job. Plan to have a nice vacation if you must.
I practice what I preach. Made big bucks during the dot com boom. When the money dried up, I went home to build an airplane while other people were loosing everything and moving back in w/their parents.
I am doing it again.
Oh, and one final thing: strong engineers are welcome everywhere, managers not so much.