Chosen Solution

Further down the road since I originally posted this; I opened the computer, installed a new HDD, vacuumed out all kinds of dust and unplugged the vents, both by the blowers and also air intake at the bottom. Now the screen stays on longer, sometimes even for a whole hour. But it still does shut down intermittently. I did the flash light shining into the screen, and indeed, my stuff is still there, but very dark. Any informed guess at what this means?

@jurgen - Checkout this answer I suspect you are having the same issue: Screen backlight goes out randomly.. But your system is a little bit older. Here is the IFIXIT guide you’ll need to follow: iMac Intel 27" EMC 2390 LED Driver Board Replacement. The here’s the part you’ll need: LED Backlight Board, Apple P/N 661-5537

I did not have any more “blackouts” for a few weeks now. After the vacuuming and installing the fan control software, it became happier. Then I even went the extra step and told my new Macs Fan Control to keep the ambient temp around 26 C and it does it. Never shut down again since