Potato slices seem to be one of those things that work mysteriously for some people and not others.
Diatomaceous earth has to be dry in order to work properly. The components of DE do actually get absorbed by plants (silica and mineral oxides), and it can be used as a soil amendment (it will make stems stronger). Along with sand I feel these things make for a big mess on the soil surface and can hinder the ability of the plant roots to breath. DO NOT use any old kind of sand, there is a specific type of sand I've read others recommend and I forget what they call it.
Fungus gnats are not caused by over-watering. While watering too frequently may exacerbate the issue, letting your soil dry out to the point where your plant roots yellow and growth is effected probably does more harm to the plant than the gnats themselves do. The problem is that when a gnat finds it's way to your grow room with your nice organic-matter rich potting mix, and decides to lay hundreds of eggs in said potting mix, a few gnats turn into tens upon tens very quickly. The real problem is that in your grow-room environment there is likely to be absolutely no predation upon the fungus gnats, their eggs, larvae or pupae. Hence the gnat population grows because it is unchecked. The real solution is to introduce predator organisms or other counter measures. Sticky traps only deal with the adults. You need to take care of the eggs and larvae in the soil. One way is Bti (Mosquito Dunks, Gnatrol) which is bacterium that produces a biological toxin which kills only fungus gnats and a very few other species of insect larva. This needs to be re-applied every other week.
The absolute best ways are with beneficial nematodes or, my favorite predator mites like Hypoaspis. Both of these organisms attack not just gnat eggs and larvae but hundreds of other species of pest insects that could find their way into your soil. Hypoaspis has worked best for me and I now keep them in all of my container plants. They turn gnats and other pest insects into fertilizer, aerate the soil surface and shuttle micro-organisms around.