Caterpillars of all species produce an identical hormone called juvenile hormone that maintains feeding behavior  Only when a caterpillar has grown to the right size for pupation to take place does a special enzyme halt the production of juvenile hormone
This enzyme can be synthesized and will, on being ingested by immature caterpillars, kill them by stopping them from feeding
Many agriculturally beneficial insects go through a caterpillar stage.