In a glider the majority of the electrikery is directly above the pilot's knees.
The master switch should hopefully remove any energy from anything smouldering.
LiFePO batteries so far are not known to misbehave.
Even Halon is toxic after suppressing a fire (to say nothing of combustion products); so you do need prompt ventilation after using Halon in an enclosed space.
What scares me are gliders without either master switches or fuses for individual instruments. If there's smoke that can't be controlled by switching off the compromised box, the next recourse is the chute.
In my glider, even the gear warning has its own fuse.
All that said, the only glider I know lost to an electrical problem was in a trailer with a loose battery bouncing around and shorting.