Hi and welcome
I am ever so sorry for your awful experience!
It is likely just the stress of the move in combination with a genetic time bomb in their body (most likely the heart) that was waiting to go off sooner rather than later whenever triggered. Just the move alone doesn't usually kill but it can lower a still developing immune system to let opportunistic illnesses in if there has been exposure and occasionally it can bring an underlying genetic defect to the fore.
Not your fault and nothing you can prevent or control - except that I would personally consider twice getting another piggy from a place that is obviously not taking the best of care of their breeding stock. Unfortunately anybody can call themselves a breeder or a rescue in this country with licensing or control, and the results can be accordingly. Sadly this applies especially to many for sales breeders.
Here is our list of carefully vetted recommended good welfare standard and practice rescues as by far the safest place to get piggies from and not having any nasty surprises.
Rescue Locator
It is very normal in those who care to firstly seek the fault in themselves and their own actions but please don't feel guilty. it is one of these freak occurrences that you can never foresee and never prevent. I have a category labelled 'cosmic bad luck' for experiences like these when an unknown factor or an unlucky combination of factors and circumstances beyond your control lead to a bad outcome. It makes it easier for me to cope with the inevitable feelings of guilt that we all experience.
Here is what you can do for the survivor:
Death, Dying, Terminal Illness, Grieving and Bereaved Companions: Information and Support for Owners and Their Children
Here is our New Owners guide collection, which you may find very helpful as it is both practical and very comprehensive and make a good resource for bookmarking, browsing and reading or rereading at need:
Getting Started - New Owners' Most Helpful Guides