Diversify! Historically, the average length of a recession has been 12-24 months. So set up a system whereby you won’t screw’s yourself over by selling when things are low, but instead you can weather the storm.
Build a rainy day fund. Determine how much cash you will need if you are out of a job and how long you think that will last, allocate some portion of that amount into low risk bonds. Russ way if you need cash you aren’t selling investments at a big loss.
If you have enough liquidity put some in real estate as a forced savings vehicle as it’s harder to liquidate than stocks. Then just sit out any coming storm.