Gnatrol, Mosquito Dunks, potato slices, yellow sticky traps, liquid pyrethrin and imid are all safe for your plants. They will not kill them when used properly.
Liquid pyrethrin usually comes in a very oily mix... if you over do it then the oils can damage your roots, even to the point of death. If done properly though, it will not kill your plants.
Imid can cause the plants to be a little sensitive to light. Raising the lights and not over doing it will keep them safe. I believe the label says to not use imid less than 65 days from harvest. So basically, only in veg. If you have root aphids in flower and you are less than 4 weeks in then you are better off throwing out the plants, dealing with the problem, then starting up a new. If you are within 4 weeks of finish then you can fight them off with liquid pyrethrin. But your yield and quality will be dimished.
Just do some research on fungus gnats and root aphids.. There are more than one variety of root aphids.. Learn how to identify them. Then look at your grow and find out if you have them or not. Look into the root aphids that people refer to as "tank beetles" (black) and the microscopic (white and very small). Flood your table up to or just above your rocks and have a look at what is floating or crawling up stems.
After that you will know if you have a fungus gnat problem or a root aphid problem.
If it is a root aphid problem then you probably have fungus gnats as well, the fungus gnats will be eradicated in the process of dealing with root aphids. If it is just fungus gnats then it will be much easier.
Let me know and i can share what has worked for me with both. My experience however is in coco and peat mixes. But with a little research you could use the same ideas with flood and drain.