We know how to make insecticides that are very effective, almost impossible for the target to develop resistance to, and harmless to most other species.
But to do so, we have to seriously understand the target species, bit there aren't anywhere near enough entomologists for that.
Briefly, what you have to do is extensively study the life cycle of the target. Insects are the biological equivalent of simple robots that follow a bunch of pre-programmed behaviors triggered by their inputs. Hormones are associated with this various behaviors.
Get a few PhD entomologists who make it their career to understand a particular insect, and they can figure out what pre-programmed behavior that insect has, and what triggers them, and most importantly what hormones are involved with which trigger.
You can then make a pesticide based on one of that insect's hormones that will trigger the associated behavior.
For example, suppose you have an insect that in its juvenile form causes a lot of damage to crops. Later, in its adult form, when certain weather changes occur, the females look for a particular plant growing in a still pond, and lay their eggs on the leaves. The males, when that weather change occurs, also seek those plants in still ponds, and fertilize any eggs they find. The adults then die.
If you can find the hormone that triggers the "go lay/fertilize then die" behavior, then you maybe can make a pesticide with that which you can spray on the juveniles. It triggers the "reproduce and die" program, even though the juvenile females cannot yet pay eggs and the males cannot yet fertilize eggs. That doesn't matter. They are essentially biological automatons, and they are running that program now. They find the pond, find the plant, go through the motions, and die.
The cool thing about hormones is that the hormones for one species usually are highly specific to that species. The hormone based pesticide probably will not do anything to other insects. It also probably won't do anything to whatever eats the target insect--things that eat insects and are not unharmed by insect hormones tend to evolve away from eating insects. Another cool thing about using hormones as the basis for pesticides is there is not much the target can do to evolve resistance. An insect that evolves resistance to its own "go and mate" hormone, for instance, is not going to be passing those genes on.
Another thing you can do when you have enough entomologists to actually seriously study insect life cycles is try biological control. For many pest insects there are predator insects that kill the pest. There are also often parasites that can control the pests. If the pest is also a predator, there are often other predators that compete with the pests for food. If you know enough about this complex web of predator/prey/parasite, you can reasonably safely try things like boosting the predators of your pests, or bringing in non-pest competitors for the pest's prey.
But you need to really understand a lot about all the involved species to do that safely, so it suffers the same problem as does hormone based pesticides, but more so.