Protecting man and machine against damaging residual currents