If someone has a major infestation the key is breaking the breeding cycle. You have to make your pots unattractive for laying their eggs and you make sure there are no other options anywhere in your house other than those you give them and can control and use against them.
Some time back one of my friends had the WORST infestation of them I have ever seen. They spread from his grow room throughout his house. Anywhere there was anything moist, they were breeding. There were so many of the little buggers that it sounded like there were a couple of those really big fat flies in each room, the ones that are so loud that they sound like they are gasoline powered.
I told him to put a layer of sand on top of all his pots, house plants included. I told him to sucker them into traps, not just for adults, but for their eggs too. I suggested old empty margarine tubs, which he used.
You place a wet paper towel in the bottom of each margarine tub and set them out wherever the fungus gnats are the thickest, and you wait and you watch. At times you will see many in it and be tempted to slip the lid on and toss them, but you want to give as many as you can as much chance as possible to lay their eggs there. You watch until you spot the first larva crawling around, and then regardless of there being five or five hundred adults in it, hopefully more than less, you quickly cover it and discard it or take it outside and empty it, rinse it and reuse it. You may only see one or a few larva moving around, but there will be near countless eggs getting ready to hatch, and you will keep them from doing that in your grow room or in your home in general.
My friend had an upstairs bathroom he hardly used and they were using the drain/elbow for the bathroom sink to lay eggs in. If you stuck something down the drain or turned on the water they just poured out. I told him to wait a day or so to let as many as possible return, boil a large pot of water and quickly dump the boiling water into the sink. It covered the drain so fast that only a few escaped and the boiling water killed both adults and eggs, and I would guess larva too, and washed them down. I told him to keep a plug in the drain after that.
It took about a week and a half but his house went from being so thick with them that they were in everything he tried to eat or drink before he got a chance to eat or drink it, keeping him awake at night as they buzzed his nose, mouth and eyes, drawn by the moisture, were so thick that he would literally suck them in breathing at times to there only being a few, and then not long after, there were none.
If they get out of control even using chemicals on your plants and bombing your house won't solve it. My friend tried that and all it got him was a short break until the next hatch. They had spread out their breeding locations to too many places around his house. You need to deprive them of any location to breed, any wet/moist location, other than what you offer and control, and then use it against them. If you do that, you can get things under control fast and not long after be totally rid of them.