The worst thing that can happen to an urban slum is involuntary demolition. Poor people have their entire (meager) wealth wiped out.
I have a new essay on why this occurs. It's not primarily evil govts or developers. Instead, I argue that it's largely changing land use.
When the value of land for different uses changes, e.g., residential land becomes useful for commerce or a poor neighborhood gentrifies, the "normal" process for change is a developer buys the land from existing owners, demolishes existing structures, and build new ones.
But with urban slums--communities of squatters--existing residents have no formal rights to the land. So they can't sell the land be compensated for demolition. Instead, the developers goes to the govt & asks for an involuntary demolition. Slums are not compensated.
The crux of the problem is changing land use combined with lack of property rights.
Without changing land use, developers have no reason to demolish slums. That's why some slums are 50+ yrs old. With property rights, demolition would be voluntary, & not tragic.
I do not deny there are some demolitions that are arbitrary and capricious. By this I mean land is more valuable as a slum than however developers decide to use it. The lack of property rights allows that to occur: prices no longer signal relative value.
But I suspect that demolitions that reduce value aren't as common as ppl think. Demolitions are costly, causing riots & bad press, esp. in democracies like India. If anything, land use changes probably happen too late, well after the point alternative land uses are higher value.
One should not be distracted by gentrification. That happens whether or not there are slums or poor renters. One can debate gentrification separately from demolition.
Giving slum residents property rights is not a simple solution to demolition. That involves trade-offs between informal owners and renters in slums which are hard problems. I'll write about those another time.