I have open an old electric fence for general inspection. The capacitor connectors are rusty and it probably need to be replaced.
I would like to understand how it works.
Inside there is a big transformer, a capacitor and this PCB :

The white connections on the top left are as follow : mains / capacitor / transformer.
Transformer output goes directly to electric fence output (claimed to be 10000V).
Questions : why is there a need of a big 220V capacitor ? to store energy and release it later, while the transformer is "ON" and doing his job ? Isn't mains enough ?
I would have expected the capacitor to store rectified transformer output, and to release in one go but that's not the case here.
It's also unclear what it the role of the 2 diodes and the 4 mosfet.
Probably to implement a timer circuit (that give a pulse every second). Potentiometers are probably used to adjust this.
I will try do to some tracing and draw proper circuit when if I have some time.