These kinds of conversions seem to be becoming more common. There's a handful on youtube using older Intel iMac guts and it should be doable with an iMac G5 as well.
In general, internal LCD connectors speak protocols that are standardized enough that you can buy adapters or converters to accept HDMI or DisplayPort input. Then, figure out how to trick the power supply into turning on to power the display.
Form there, you literally just slam an M1 mini (or its uncased guts) inside whatever it is you want to convert. Pair with cable extensions, use wifi and bluetooth and you don't even "need" to cleanly match up the ports on the back of the machine.
If un-cased, an Intel mini would probably have worked fine in an iMac G4 base, even the 2018+ high wattage ones, or the 2011/2012 models with Radeon graphics, which is kind of an indication to me they didn't even uncase the mini they put in. (or perhaps this person wanted to have a mini with no fan, which is not something Apple ever built, but the M1 mini should work fine that way.)
I think the fact the M1s can be fanless, means one less issue you need to manage inside these old cases. As you note, once you sort out the HDMI to internal LCD interface, it’s just a lot of wiring adapters inside to the ports - might even be able to piggyback off the existing ports in some cases (ie USB - or did USB2 and USB3 have slightly different pinouts?) TB to firewire adapter if you‘re keen (do M1’s support the TB to FW adapter?)
Or if you wanted to put in a fan anyway, it wouldn't have to be a noisy one. Just grab a nice slim Noctua and use a splitter to cap RPM, which would be nearly inaudible and enough airflow to prevent throttling after 10 minutes of load. If you wanted to get fancy you could put in some nylon filter mesh on the intake.
With regard to USB pinouts, I *think* USB 3 pins are a superset of USB 2's, and so if you were ok with USB 2 speeds the existing ports might work alright. TB → FW should work fine so long as macOS continues to have drivers for the FW chipset, since in practice TB is no different from a PCI-E card.
I think if I were to do this mod I'd want to get the optical drive working, or at minimum replace the optical drive with a 5.25" bay memory card reader, so I would probably have some kind of TB hub set up internally to accommodate that.
To be clear, I don't think the person who did this mod bothered to adapt the machine's existing ports. They don't show the back in that forum thread and they are using a bluetooth keyboard and mouse. I genuinely bet they literally slammed a complete Mac mini inside the hollowed-out dome of the iMac G4 and only bothered routing power into it.
It would be possible/reasonable to a more in-depth mod. You could de-case the mini, use some USB extensions, an ethernet extension, etc etc etc.
I think it's up to an individual as to whether or not doing a more in-depth mod is worth it.
At this point, if I had an iMac G4, it would be front and center explicitly as a vintage Mac, and not as a conversion. When I get an M1 Mac, I am going to want a new 2021-quality display to go with it, and not something that was midrange in 2002 or 2003.
Yeah I definitely feel that. The form factor is cool enough to design a new case around, though… it'd be pricey but I could see 3D printing or CNCing a dome case for such a build. The arm would be harder but there are decent looking VESA arm segments one could design around which would then open up access to a ton of display options.