The same thing has happened to me when recovering ye olde Mac. The intermittent shutdown was a clue to the problem, and the psu bang was the answer.
Had the G3 been stored in a loft or garage for a while? It just needed a few weeks indoors to thermally adjust and dry out.
That's the voltage regulator for the cpu. A handy spare.
Are you 100% certain that the logic board is blown? I've seen quite a few psu bangs that have not killed the computer. In your case, you can test the logic board using a generic ATX psu (move the jumper on the logic board to PS/2).