I mean everything goes through boom and bust cycles. If you want a relatively safe job think about becoming a public servant. However, dev jobs are some of the best jobs in the world, as it allows one to work in many sectors and the pay is generally very good.
I invest and save aggressively. So a bust cycle lasting a few years won’t matter to me.
Additionally, keep life expanses reasonable and not getting sucked into consumerism keeps the cost of living low.