You can’t predict a recession, and you’ll just lose money by trying to. The sane approach to retirement savings is to invest more heavily in higher growth/risk assets the further you are away from retirement.
If you don’t need the money for another 30 years, it doesn’t matter if you lose 30% in one year. If you were gaining 10% most years, but have a couple of big downturns during your working lifetime, you’ll still come out well ahead of the person getting 3% every year.
recessions are an inevitable component of a business cycle. I can't predict when it will happen, but I can prepare for it to arrive when it surely will.
Preparing your investment portfolio for a recession means moving your money into lower risk, lower return investments. Trying to prepare for that is trying to time the market, which you can’t do. For retirement specifically, as long as retirement is sufficiently far away for you, then you’ll make the most money by forgetting that recessions even exist, and maximising for long term returns. Go look at pretty much any high growth mutual fund, even if it had a 30% down year in 2008, it’s 20 year returns will almost certainly exceed the returns of any low risk asset.
If you don’t need the money for another 30 years, it doesn’t matter if you lose 30% in one year. If you were gaining 10% most years, but have a couple of big downturns during your working lifetime, you’ll still come out well ahead of the person getting 3% every year.