The dangerous mains voltage should only be present on the live contact of the mains socket. The earth contact should have a low or zero voltage so that it is safe to touch. As the installation was deemed correct we can assume that the earth contact was properly connected.
It is the task of the charger to separate the (dangerous) mains voltage from harming the (human) user.
The charging cable only conducts the safe (mains isolated) low voltage to the phone. The cable should have no unsafe connection to the mains as the charger must take care of the isolation from the mains.
The phone connects to the cable so the same that is true for the cable is true for the phone, it should not have any unsafe connection to mains power.
So my conclusion is that the charger must have been faulty and/or is of a type that did not provide enough mains isolation and/or was getting too humid. In the manual of the charger it usually states that the charger should not be used under very humid conditions.
On a good (and dry) charger, you can touch the low voltage (USB) output as much as you like using your fingers or a broken cable and nothing should happen.
On top of that you would need to be quite unlucky to get shocked in such a way that you (immediately?) die.