What has helped in the past after halving, is that the bitcoin price would spike after a few months there by making mining still profitable.
As long as bitcoin still has a value, then mining will always be profitable. The question is "At what difficulty will mining be profitable?". If the price was to suddenly crash to $1000, then yes, many miners would shut off, and block time would increase until the next adjustment. After the difficulty adjusts downwards, however, then it becomes easier to find a block, therefore less expensive to find a block, and some miners would then turn back on as it is again profitable for them.
From the genesis block up until September 2017 when bitcoin crossed $4,500 for the first time, mining was less profitable that it is today, even after the most recent halving ($4,500 * 12.5 BTC = $56,250 compared to $9,000 * 6.25 BTC = $56,250). A year ago, when the price was sitting around $3,500, the block reward in terms of USD was $12,500 less than it is today. And bitcoin was fine throughout.
So, what happens if the bitcoin price still stays in the same range for the next 3-4 years?
Even if the price doesn't spike in the coming months or years, mining will continue to be profitable, just at a different difficulty than it is now. Some miners will switch off, and others will switch on. It is a self correcting system.