@MartiMasters appreciate the post on gnats covers a lot of info.
Maybe the pesky gnats can be SOmewhat controlled. For house plants… I use small rocks to cover entire surface of soil, also add finely ground eggshells covering the entire soil surface. Only water when surface soil is dry, never soggy soil.
It works not sure why, my guess is it blocks the access - exit and entry for gnats. All I know for sure is that it stops the lil pesky's in my potted plants in their tracks.