To be clear, when I say theory, the theoretical part is not that these taxes could exist but that the tax could adequately price in negative externalities, which is hard because generally price discovery is hard to do and in particular one of the things about the negative externalities of lots of activities is they are not fully known at the time the goods are produced. eg when the would was going ham producing asbestos it was probably not fully appreciated quite how harmful that was. So lots of the information which would be the raw material for that price discovery is unavailable.
Governments do sometimes impose pigovian taxes and as you say, this can be politically unpopular which is why they don’t always stick. For example, in the UK there was the “fuel price escalator” which was a direct response to climate change. The government decided to impose a tax on retail petrol and diesel prices that would rise in line with inflation or faster to encourage people to move away from fossil fuels over time. It led to a weird uprising where truck drivers picketed oil depots and the country ran out of fuel so the escalator was abandoned.[1]
[1] https://en.wikipedia.org/wiki/Fuel_protests_in_the_United_Ki...