What about transistors? As of now, they're just easy-to-melt metals, but I would imagine that by the 24th century the Federation would have come up with some kind of viscous liquid conductor which reacts with the material of which the wire casing is made to form a hyperinsulating gas.
I mean, it would be similar to burning wood, sort of. C (s) reacts with heat and O (g) to form CO (g).
Similarly, if we let the viscous liquid used in the wiring be X, and let the material of the inner tubing of the wires be Y, then X (l) reacts with heat and Y (s) to form XY (g).
In other words, the inner wiring would turn into gas as soon as too much power is flowing through it, say, 25 megawatts (i.e. for example, 5000 V * 5000 A).
So, if this kind of transistor were to be inserted into every wire going into and out of the shield systems and hull, no panels would explode.
And since there are replicators, it can be synthesised at no cost, and wouldn't affect the building of the ship.
Of course, there could be several problems, eg. the viscous liquid might be very corrosive, or extremely toxic, but I'd say the likelihood of that is relatively low.