I amend soil with neem seed meal, and foliar weekly/biweekly with neem oil in veg and week 1 of flower. I "live" with fungus gnats, once i started buying this organic mix from the nursery they were introduced (in an organic system they will show up inevitably at some point) it's been a good 6 months since they started showing up and i never see more than a few flying around and i keep yellow sticky traps to monitor as well, and the bitches are happy 'n healthy
It's a good overall preventative treatment and keeps the ladies lookin' vibrant lush and green and get shiny over time that seems to prohibit predatory bugs 'n mites from even thinking about takin' a bight....
Never liked the idea of a layer of sand, seems like it would allow less oxygen into the soil and lead to compaction, probably not a major issue but thats just me
mosquito dunks didn't work for me years and years ago when i had gnats up the wazoo, seems it works for some not for others, maybe some have super gnats lol