Or, and here's an idea, we can enact sane regulations like licensing requirements to prevent the negative externalities from happening in the first place.
Edit to add:
And by regulating local externalities at the local building level rather than the city level, you are more likely to have better regulations in regards to residents and owners wishes.