Flies are an issue for us, too. I use Sweet PDZ stall refresher to neutralize ammonia and dry up the duck poop. It helps. I also have baited, reusable jar-style fly traps hanging on the outside of their enclosure that attract and trap hundreds of flies per week. I figure that the poop is going to attract flies no matter what, so I use the traps to get as many of them as possible lured to their deaths. I also hang a few fly strips securely from the ceiling of the enclosure to trap more of them. The jar fly traps do smell bad, so we hang them on the part of the pen away from the house. They are worth the smell to us, since they catch so many flies and the smell is mostly only detectable in the heat of the afternoon close to the traps.
When the traps get full, I spray water in through the openings and close the top so no flies or maggots can get out and put a brick on the top to hold the top closed. In a day or two, when I’m sure everything is dead, I put on disposable gloves and open the trap and dump it into the trash bag in the can we put our dog poop into, ties it up securely, then put it out with the trash. I time all of this with our garbage pickup so there is no smelly trash in our dumpster attracting flies. We compost our duck bedding or use it as mulch in our vegetable garden on our tomato and pepper plants.