These remind me of the post-1906 earthquake shacks](https://sf.curbed.com/2017/4/18/15333168/sf-quake-shack-houses-camps). Better built attached housing would likely let people live better at a similar, if they could manage to agree on reasonable rules about living just a bit closer.
The most effective wall you can build is a concrete block wall/insulated air gap/concrete block wall. It seems like overkill but this is the type of construction that cinemas have between individual theaters. The only way to get more isolation (aka the “good, thick wall”) is to decouple the walls, and at that point you’re at separate structures anyway which adds the advantages of fire breaks and not having to have a legal entity governing common components like that roof.