The computer, however, was in desperate need of a cleaning. The filter at the front of the computer case was completely clogged with dust, which would explain the really lousy airflow and how warm the top of the computer was when I yanked it out. There was dust everywhere in the case, particularly trapped in the vanes of the CPU heatsink, which could not possibly be a good thing. Fortunately, I still had a can of air, which I used to blow the dust out of the heatsink without too much trouble.
I've now made sure that all of the fans are clear and I've reassembled the box and stuck it back in position.
We'll see how it goes...
Update: Good so far. Meanwhile, the BIOS had been reporting a CPU temperature of 85 degrees C a couple of days ago; that's now down to 50 degrees C. The theory that the shutdowns were being caused by overheating looks pretty good at the moment.