Get a job doing something 'boring'.
I work for a company which makes control systems for large industrial machinery. Our order book is about 10 years long. The products we sell will be in use for at least 30 years, and if at any time during that a safety issue is found, we are required to fix it. The team is quite small and we are fully stretched to meet the product requirements. In other words, layoffs are pretty much impossible