If you are worried about this incident, just wait until you hear about crude-by-rail! Crude is transported through LOTS of residential neighborhoods and zoning doesn’t matter. Additionally, railroads are governed by federal law so states / local munis can’t put additional restrictions on where, when, or speed limits.
Once a pipeline path is built, it’s inevitable tech debt that requires regular upkeep. You now have to trust PG&E (or whatever faceless expense-minimizing company) with regular maintenance of that pipeline.
Many railroads are interconnected, so the higher risk payloads can be routed further from residential areas when possible.
Ultimately risks can’t be completely avoided. The risks should be transparent to homeowners / renters. The city / county emergency crews are supposed to already have this info, so we know it’s available to some people but apparently not to every person whose life is impacted by these risks.