In my experience, those swallowtail caterpillars have a very high mortality rate. I can have a parsley plant with ten of them on it and every day fewer. Even the ones that make it to chrysalis, may not survive.
If you want to increase your population, probably best to bring them in, in a jar and protect them to adulthood.