The probable cause is OE (Ophryocystis elektroscirrha) an obligate, neogregarine protozoan parasite that infects monarch butterflies. Unfortunately it has been proved by scientists from the USA that we do have OE in New Zealand. Often it renders the caterpillars so weak that they don't have the strength to form their chrysalis.
We are quite unable to tell with the naked eye whether or not a monarch is infected with O.E.
As a caterpillar, the parasite is located within the gut and would be impossible to detect without killing the larvae to obtain a sample of the gut contents. On adult butterflies, O.E. spores are dormant and reside on the outside of the body, usually the butterfly's abdomen. You can't see these dormant spores without observing a sample of the butterflies abdominal scales through a microscope. You can learn more about obtaining scale/parasite samples from an adult butterfly by visiting Project Monarch Health, www.monarchparasites.org.
My concern now is that the other caterpillar, now successfully in its chrysalis, may also have OE.
This will be a watch an wait time until the butterfly emerges and, even then, I'll have no way of knowing if it has the disease and will continue to pass it on.
Apologies about the grim pictures here, however I think it's important to be aware of what's going on when something untoward happens to a caterpillar or butterfly.
I took these photos this morning. You can see that the skin did start splitting at the back of its head as it began the process of slipping out of its skin but then, in its weakened state, it died from the effort. Poor thing.