The trick is to keep everything dry (less then 30% moisture) so fly larvae cannot develop. That means the bedding/substrate has to quickly pull the moisture out of the poop. Dry sand or packaged wood shavings will do that until there is a spill.
Deep liter and compost can be nearly free of...