I don't think I've had peppers or seeds destroyed by fungus gnats, but I used to have them every year, until I found a solution: Microbe Lift (actually, I used to use another, more dilute brand, but it is only available in 2.5 and 50 gal amounts now!). This is a liquid with Bacillus thuringiensis israelensis - the same thing in mosquito bits and dunks, and extremely concentrated. Only 8 drops/gal needed, and one 6 oz container lasts me two years, since I only use it every 4or 5 waterings (just watered my indoor plants with it today). When I moisten the pro mix or whatever when I am getting ready to pack the pots for planting, I use this, so it is in from the beginning. I use filtered water when mixing it up - I figure chlorine might kill the bacteria. I have NEVER had fungus gnats in my house, since using this! The cheapest place for it is an Aquarium place online, where it sells it as a mosquito control for ponds. I can always find enough to get the free shipping ($50), since I have 4 aquariums, as well.
https://www.drsfostersmith.com/product/p ... atid=12263
I used to use this in my hydroponics, but now I just break off pieces of mosquito dunks, and drop them in every few weeks.