To manage flies, you really need a multi pronged approach.
First use Rescue fly trap bags, AWAY from the coop:
https://www.amazon.com/RESCUE-FTD2-...ld=1&keywords=fly+traps&qid=1626974112&sr=8-3 Hang them no higher than 3 ft above the ground, or they won't work as well. We have a farm of 24 acres and hang them out around the periphery. They stink, and will draw flies TO your coop if you put them near the coop!
Keeping the coop as clean as possible helps. We use these in the barn. They have no pesticide and only attract though the reflection. Not sure if chickens would mess with them, but you could put in the coop, while they were out for the day:
https://www.amazon.com/Farnam-Garde...=991V4HV04ZWB7XW9DY9E&qid=1626974512&sr=8-178 This is another type, but you hang it up higher for a different kind of fly:
https://www.amazon.com/Farnam-Garde...=991V4HV04ZWB7XW9DY9E&qid=1626974639&sr=8-125
Lastly, you need to spray. Permethrin with Piprofoxin contains a harmless growth regulator. The growth regulator only effects insects because it stops them from being able to shed their exoskeletons. This is one that could be used for a quick spray inside the coop. It will knock down the current flies only. And it's safe enough for inside hospitals and restaurants.
https://www.domyown.com/565-plus-xlo-20-oz-p-121.html This is another type of pryrethrinoid that we use to knock down flies and it's AMAZING! I totally love this because it doesn't smell and make me sick spraying it. As long as you don't get it in their water, it's totally safe, once dried. In fact it's made to be sprayed in poultry houses. This is a once dose container but we get it in bigger ones:
https://www.amazon.com/Tempo-includ.../dp/B014I3EGQ8/ref=psdc_3737951_t2_B003AYWEL6
The electric zapper is a great idea to eliminate flies in the outside coop.
Lastly, If you get flies in the house, THESE ARE AMAZING! I loathe flies in the house! we change them once a week,because who wants to see dead flies LOL
https://www.amazon.com/gp/product/B01N02XQ2U/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
Looks like the gnats are a really serious issue too:
https://blog.mcmurrayhatchery.com/2...-alert-black-fly-buffalo-gnat-poultry-deaths/