Were I not in the direct path of whatever sewage spill Tijuana has to offer on any particular day, I might try sand. Instead I use diatomaceous earth for fungus gnats. The down side is having to add more after watering as the water dissipates the diatoms. I've used beneficial nematodes in other gardening situations and had good results. Hydrogen peroxide is great for larvae. The down side to H2O2 is it will kill anything beneficial. I use it only in early vege and to treat soil before planting. It's also good in foliar sprays. Let's not forget the extra oxygen hydrogen peroxide adds.
Don't blame the soil. Blame the soil storage. When you see pallets of bags of moist, decomposing soil you're seeing pallets of bug environments. Grab bags from tops of piles at stores. If you have space or a huge planter you can pour soil out and mix it up a bit before you use it. Let it sit as long as you can to dry out before you use it. Then prewater with H2O2 and H2O.