After about two years of increasingly recurring kernel panics while using Firefox, I think have solved the problem, thanks to some googling and advice from others.

I spent a while keeping an eye on this thread:
https://bugzilla.mozilla.org/show_bug.cgi?id=1111808

The kernel panics were blamed on sites that used WebGL, combined with imacs that had an ATI Radeon X1600 graphics card.

A couple days ago I found another site which offered what I hope is the solution:

https://superuser.com/questions/73518/ati-x1600-driver-problem-on-mac

Here the advice was to use a program that allows you to adjust the fan speed, the assumption being that excess heat was causing the graphics card (or something) to become too warm, thus setting of a kernel panic. For me, this only happened in Firefox, and I had long ago disabled hardware acceleration in Firefox prefs. I did disable WebGL through Firefox config a long time ago, but I don't remember how to re-enable it. I don't remember how to check if it is enabled.

Regardless, I downloaded Macs Fan Control and used the default settings. So far no kernel panics, not even on sites which were guaranteed to cause them. I'm hoping for the best.

Wow, what a long, terrible problem that may finally be solved. So many people shaking their heads at my old machine. It lives!