The straightforward - but not easy - solution is to ask governments to assess a charge on each sold item that brings the price in line with the full cost to society.
Note that market failure does not mean that the “market” mechanism is the cause of the failure - rather the issue is the incompleteness of information. Markets would solve this allocation problem very efficiently once the subsidy is removed. I imagine for example that most packaging using non recyclable plastics would become entirely uneconomical, and the full price of gas would be so high that industry will be incentivized to look for alternative technologies and sources of energy.