Closing toilet lid before flushing doesn't keep viral spray inside, study suggests
(www.cidrap.umn.edu)
The only way to stop this would be to change toilet lids to be an air tight seal (with some kind of 1 way valve to allow air in for flushing) or control the air flow, in a way that's strong enough to capture ejected particles, and suck it through a filter.
The second option would have the added benefit of capturing particulates when people are actually farting and shitting, as well as removing the smell.