It is possible to damage the camera mechanically and kill the firmware. It'll probably not happen with the CHDK trunk builds, though, but it's fairly possible with my experimental branch. There's a reason those features didn't make it into trunk yet
Just be careful when creating/running scripts. Read what they're supposed to do and read the warnings that come with some scripts. Canon put in a lot of failsafes so it's hard to damage the camera, but i.e. the 'super-tele-macro' script shows that they can't prevent everything (causes the S3IS lens to make some nasty sounds which indicate possible mechanical damage).
Infinite loop: no, normally not. There are some watchdog timers in the Canon OS, though... but the camera does not automatically shut down when it enters an infinite loop beyond the OS' control (I have observed this when dumping my camera's firmware through the AF LED, it kept going for several hours as I wanted
). The CPU cannot distinguish between normal code and an infinite loop, so it happily keeps executing until you kill the power.
Overheating is probably not an issue, I guess they designed it so the TDP won't be a problem.