There are common measures taken to address the issue:
You make an emergency services levy funded from land tax. It's not always worth protecting every individual home, you invest in the fire brigade, you invest in a local shelter. The problem comes when the poor say they can't afford the levy, their "stake" in the property market is a tent, and try to use emergency funds as a piggy bank for homeless services.
Left wing governments will break such right wing piggy banks every single time.
Building codes are the middle class preference, more in line with material costs, they won't let a billionaire invest in some five story abomination and won't let homeless families move into demountables and vans. But trying to stop over investment is diminishing returns, if investors can't build extra stories they'll triple glaze, build stone walls, underground garages, the material waste gets stupid. And the rich will buy a greater number of homes, the middle class would much rather the poor payed the rich excessive rent.
The poor man's view of deregulation, land grabs, self building, quickly creates a materials shortage, is a humanitarian disaster waiting to happen, and doesn't drive investment.