So, for gnats in soil, you can do a few things. One, and probably the easiest, is put about 1 inch of sand on top of the dirt. Sand dries incredibly fast, and will prevent the larvae from ever reaching surface. Two is a nice top dressing of
diatomaceous earth. The problem with DE is it's useless when it's wet. The third is to bottom water. The surface will not get saturated and the larvae tend to live in the top 2" of soil, so by it staying dry, you eliminate the problem.
Now, to using a moisture meter. Learn your pot weights. Saturate one and get familiar with its weight. You can even use a scale if it helps till you learn what feels right. Now, wait till a plant starts to droop -- look like what you have now. Pick it up, note the difference. When they get light, you water. Otherwise, you don't. Easiest and most reliable method of knowing when to water. I apply this technique to all container plants I grow, not just herb.