Substitute the trolley for a tornado, the tracks for homes, the deity killing randomly with said tornado, and the survivors thanking deity for their survival (and their neighbors’ deaths).
Not a good analogy? Of course it isn’t. God doesn’t exist, and if he does, he’s perfectly happy killing you and destroying your family for no reason whatsoever, and your neighbors will thank him for doing so.
Look, don’t kill me over specificity. I wanted a general statement and cannot possibly name every avenue by which society collapses without being boringly pedantic, however I would suggest that “modern” Non-nomadic societies generally faced wealth concentration, disparity, and collapse at some point.