Hi Chris
Sounds nasty.
Why did the RCD not trip? I would expect that there could be several reasons for this...
- the current flow did not reach 100mA so the RCD did not "see" the fault
- the RCD may itself be faulty - has it been tested recently?
- remember that an RCD does not know in any sense where the residual current goes, it only know that there is an imbalance (in this case >100mA) in the phase / netural currents. It could be that the earthing is inadequate, but this failure to trip is not the determinant of that. I suggest that you measure the earth loop impdence of the circuits in question, to determine whether the earthing is adequate.
- consider turning off supplies not essential to your work in restricted areas. You were lucky - how would anyone get to you if you had had a more serious shock?