Neurotoxins make them squirm but also woozy. I think this is a ok way to go.
Though only for vampire flies and gnats, in a closed room.
Wasps you can shoo away with a spray bottle and lavendel oil or another oil they hate, there are lists of plants online.