Hi,
Earlier, there was a (dban-2.0.0_powerpc.iso) download of an ISO file with a DBAN wiping utility for PowerPC. This would create a bootable CD-R that could be used at least on G3 Macs.
Otherwise, you may have to open the G4 Mac and remove the internal hard drive. It could then be connected to a USB universal bare drive adapter (one example at https://eshop.macsales.com/item/NewerTech/U3NV2SPATA/), which would allow another Mac (or PC) to erase the hard disk. Alternatively, you could keep the removed hard drive, or you could destroy it (using a hammer or drill).
Unfortunately, these methods would not allow the reinstallation of an operating system (without access to system discs). You would need retail discs with a system version higher than the one originally installed. Such discs could possibly be found via an online auction site, but would be expensive.
https://everymac.com/systems/apple/index-apple-specs-applespec.html