You can actually make selective pesticides, but the people that pay for pesticide development can make a lot more money with non-selective pesticides.

Much of the behavior and life cycle of insects is controlled by a variety of hormones. For example suppose you've got an insect that needs to lay its eggs when the weather starts to cool at the end of summer because they eggs will die if it is too hot, but before the weather gets too cold. And suppose that after mating the males die.

There will likely be some hormone that gets triggered by weather changes that will cause the "find a mate and lay eggs" subroutine hard wired into the insect's brain to run. (Much of insect behavior is essentially hard wired routines that get invoked by a complex hormone drive state machine).

If you identify what hormone that is, you might be able to make a pesticide based on it that if you spray it earlier in the summer, when it is still too hot for the eggs, will trigger the "mate and lay eggs" routine. The insects will mate and lay eggs, and the summer heat will kill the eggs. And the males have mated so they die. So when the weather starts to change and the hormone is active again in the females there are no males to mate with them.

Unlike pesticides that work by disrupting something necessary to life in general, which then tend to kill things other than the target either by being sprayed on them, or by things higher in the food chain eating things that were sprayed (or eating things that ate those things, and so on), they hormone pesticides tend to be a lot safer for other species.

That's because the target insect does naturally produce the hormone, so it is already in the food chain. Most other things in the same ecosystems as the target insect will have already evolved to not be too bothered by it.

What holds these kind of pesticides back is that to develop them you have to have researchers who delve very deeply into the biology of the target insect. There are a lot of different insect species, and even if you just care about pest insects there are still a lot, and you've got to do each species separately. There isn't enough funding to produce enough PhD entomologists to get the number of specialists you'd need to do the research.

A similar thing happens with with biological control of pest insects. If you've got an invasive insect that native predators and parasites won't control, one way you might deal with it is bring in its predators or parasites.

Often bringing in non-native predators or parasites is a very bad idea, because they often also go after native species. With insects though it can often be done safely. As with much other insect behavior, what insects predators insects pray upon is often very specific. They might only go after one specific species. Same with parasites. If you've got an insect that is kept under control because some parasitic wasp lays eggs in them, that wasp might lay eggs in only that specific species. If that species becomes invasive somewhere else and you bring in the wasps, they won't hurt anything else.

But to make that work, as with hormonal pesticides, you need to know a whole lot about the predators and parasites of your pest. But there aren't many openings for the PhD entomologists it would take for that.

An example of this was a few decades ago there was some invasive species from I think Florida that was devastating California citrus crops. To try to control it they brought in a parasitic wasp (if I'm correctly remembering this) from Florida that only attacked that species, and is what kept it under control in Florida.

It completely failed in California. It was only years later that anyone figured out why. It turned out that the pest species was actually two very closely related species. So closely related that no one had realized there were two species. And the parasite wasp species was also actually two very closely related species, which was also not known at the time. The two parasite wasp species each only attacked one of the pest species. It turned out the invaders were all from one of the two pest species, and the wasps they captured and brought to California all were from the species that wanted the other pest species.

No one knew about these subspecies before because there were only two entomologists in the whole US who specialized in parasitic wasps. There are many thousands of parasitic wasp species in the US, and neither of those researchers had ever looked closely at these particular ones.