Composting is indeed a complete ecosystem but flies don’t need to be tolerated.
The best product for dealing with them is our DE powder https://www.wigglywigglers.co.uk/products/diatomaceous-earth?_pos=1&_sid=fdc3360f1&_ss=r
or to sort it inhouse Eliminate large clumps of rotting food. When you feed large pieces of food to your worms, the worms generally can’t consume them before nature takes hold and the food starts the process of decomposition. When this food breaks down, it creates chemicals that fruit flies are attracted to. By getting rid of these large chunks, you are removing most of the suitable egg-laying space, which should put a huge dent in the fruit fly population. covering the waste with the coir/compost will help and keeping the newspaper on top is good as is the moisture mat. This will work to keep flies from getting in and laying more eggs, and it will also work to keep existing adults from getting out. Like a surgical mask, air and moisture will still be able to flow between the world and your worms, but the pests will be blocked from entering and exiting.
Make your own fly trap. This can be as simple as setting a little jar containing a mixture of red wine vinegar and dish soap on your counter. Within a day or two, you will start to notice a collection of dead little flies floating on top. If you’d like to try other trap methods, consider making a paper funnel that will invite fruit flies down into the vinegar but make it nearly impossible to fly back out.