The government decides what is an externality and determines the tax rate.
Two things governments are good at: taxing, and starting wars. Why not take advantage of the first?
It even has the advantage of being a revenue source for the government, rather than a revenue sink. The government has to tax something, why not externalities?
Around here, the government decided to tax plastic shopping bags. Geez, just put a tax on it instead. Raise the tax until plastic shopping bags become scarce enough. Then if someone really wants a plastic shopping bag to use, say, to clean up after their dog, they can if they're willing to pay. Much better than being charged with a crime.