So sad! Probably just one of those things you can't foresee or prevent. Tudful Tamworths is right that many farrowing problems can be prevented, but in healthy, outside-living, rare breed pigs farrowing problems are pretty rare. We don't vaccinate ours against anything (on our vets' advice): most of our farrowings have been fine but we did have one mangalitza who had 3 piglets in her first litter, one of which was stillborn, and then squashed one of the 2 survivors. Sometimes s**t just happens!
Better luck next time!