Can an RCD protect against transformer failure?
Yes, it would, but 30ma won't belp you in a pool.   Here's how electrocution drownings work. 


Current as low as 10ma stuns the person in pool. 
They faint.  
Where they fall, their nose or mouth are under water. 
They drown. 
Rescuer sees them unconscious, reaches out or jumps in to save them. 
Current stuns rescuer. 
Go to 2. 


You think I jest, but often the way they know it's an electrocution drowning is multiple victims.  The coroner can't tell an electrocution drowning from a normal one. 

What you want is personnel-grade 8ma protection.  

Another defense would be to tie your DC negative terminal to the local grounding electrode system.  This means the DC is no longer an isolated system, and is a potential ground-fault path for your AC system.