If you have a gnat problem you're watering too much or not mulching correctly from my experience. Gnats are part of the decomposition process. If your growing in living soil you will always have some gnats. This is why living mulch is a good idea. It takes the guess work out of things. So the ewc is a good idea, but after that you need mulch over it. Like 3 inches deep. that spot on top of the soil under the mulch is the zone that all biolife grows. Keep it covered. Composted mulch is good, Leaf mould is good. But cover that up so that the bugs in the soil will eat the gnat larva. You get the bugs from decomposition. Hence the entire circle of the soil food web.
However if its out of control a small juice glass with some apple cider vinegar a little bit of warm water and 2 drops of dawn dish soap does act as a very good gnat trap.
View attachment 4862130