Is there any danger/risk in leaving my iMac G5 turned off and disconnected for long periods of time?
Your machine is now 10 years old, so there's definitely the risk that your PRAM backup battery has "worn out" and is nearly dead now. The life expectancy for these kinds of "coin cells" is normally about 10 years.

So if you disconnect your Mac from the power supply for an "extended time" you risk that it fails to back up the PRAM. A battery loses its charge over time, and that's especially true for worn out batteries. The more you disconnect your Mac from the mains connection the more the backup battery has to supply the PRAM with electrical current, which in turn causes the battery to wear out even more.

Disconnecting your Mac from the mains connection as such is not harmful for your Mac or any of its components.

You could have your battery replaced which should cost you about USD 100-150 (my estimation based on the effort to completely disassemble the iMac). Then leaving the iMac disconnected for a month would not be any problem at all.