You could duplicate inserters to a poluting variant, each time an inserter is placed or tiles are changed around it it would get replaced to the appropriate version depending if the inserter would dump or not,
To make a poluting inserter, you have to change the energy_source to have emissions_per_minute