Ok, I'll give more detailed description of entire pollution creation, dissipation, absorption and cleaning here for better understanding.
Example - a chunk with some miner buildings. They produce pollution with some not stable speed (depending on extracted resource requests by player's factory).
Chunk gets pollution units (PUs) rise to some value - minimum diffusion value. Usually it is equal to 15.0 PUs. At this point pollution is not only absorbed by trees and ground tiles, but migrates to adjacent chunks. And here is the key point - player is interested in reducing pollution migration from this chunk as diffused pollution will eventually reach enemy nests.
Air filter building cleans pollution with 100% stable speed (let's imagine that it has abundant amount of clean filters available and no problems with electrical energy income).
Depending on miners speed, efficiency modules used, resource mining productivity and some minor factors some PUs are generated from time to time. And building should consume them, spending clean filters and energy.
Player is focused on goal to clean as much of produced pollution as possible - player installs appropriate number of air filtering buildings.
This mod mechanics is very UPS effective and does not directly control PUs in chunk, only generates ingredient for air filter recipe to start work from start till iteration finish ignoring PUs level in chunk.
It leads to situation when there is 0 PUs in the chunk and some %% of filters+energy are wasted. Especially when pollution is generated in big numbers and requires several filtering buildings in chunk (or even adjacent chunks).
Deactivating the building fixes this problem. The same script that produces ingredient deactivates/activates building when PUs level is going below 25% of minimum diffusion value / exceeds 75% of minimum diffusion value. Building activity is regulated via the same script without noticeable UPS consumption growth.
Air Filter building deactivates for some time till miners produce enough pollution and then activates again. That's all.
Unlike building with chemical energy source, all electric energy buildings do consume energy via drain when they are deactivated. Therefore I suggest to decrease energy drain. For example to reduce it by 10 times to be closer to factorio standard for electric energy buildings. Active energy consumption can be increased by 2 or 3 times to compensate.