Certified GKH Gardening Expert
The following article should be of some help to you: https://www.gardeningknowhow.com/plant-problems/pests/insects/prevent-caterpillars.htm
Prevention is key with regular checks of the undersides of leaves, especially during the spring and summer, which may turn up moth or butterfly eggs that will develop into caterpillars. Simply pick off the eggs and dispose of them. For a smaller number of caterpillars, simply pick them off, relocating them elsewhere or squash them. They can also be dropped into a small bucket of water and drowned. Beneficial predator insects are another option for control. Some quick and easy homemade repellents to keep caterpillars from eating your plants include solutions of water with one of the following plants added: onion, garlic, chives, hot pepper (jalapeno, cayenne), or an herb (basil, coriander, wormwood, peppermint). Steep the leaves in hot water or mix in a blender and strain before spraying. These sprays will successfully repel a wide range of insects. Flour and salt can also be used as a dust to suffocate or dehydrate many types of caterpillars.