Lots of things directly kill or parasitize caterpillars...they're like a universal food source. And that's why different species use survival strategies. Some are toxic to predators because of the host plant, some resemble bird droppiings...or other species that ARE toxic, some build nests or hide underneath leaves, some have osmetriums that can stick out and give out a very unpleasant smell, some have eyespots, some hide under the mulch or dead leaves during the day. And then there's stinging caterpillars or those on stinging host plants (like stinging nettle). And some species lay a LOT of eggs, on the theory that surely some caterpillars must survive out of that many.