"I tried to install two additional RAM units in a mid-2011 iMac to get it working at usable speeds again"
Assuming it still has a platter-based hard drive inside, RAM isn't going to help much insofar as "speed" is concerned.
After 12 years, it's time to start shopping for a replacement before you spend any money on this...
This is a good point, as I was just assuming that everything was working fine on the iMac prior the RAM swap, but after reading your post, and re-reading the OP's post, it could be just the HDD was starting to fail, the OP thought that RAM could speed it up, but RAM won't do crap if the boot drive is on its last leg.
However, it still won't boot... the apple icon appears and it starts the boot process, then with the bar around halfway full the screen goes black and it powers down.
This symptom is most likely what
@Fishrrman suggested, the HDD failing/failed, but I have also seen it happen with a failed GPU as well. It has been a long time since I booted a Mac with an unseated RAM stick, but IIRC, it wouldn't get that far in the booting process if it was just RAM.
The Mid 2011 iMacs tend to have two big problems with it, GPU failures and HDD failures. If your HDD has lasted over 10 years, you are pretty lucky. The GPUs fail often in these models as well, but there is often signs of them failing prior.
My personal opinion is that the very hot running HDDs speed up the GPU failures, and I recommend anyone with a Late 2009 to Mid 2011 iMac to swap the HDD for a SSD.
Now, as for what to, if you have a spare external drive sitting around, you can try to install a fresh OS to it and boot from that. This would be a good option as it would eliminate the GPU as being an issue. If you cannot boot from an external drive (or swapped internal drive) either, then I would bet that the GPU finally failed.
If the external is working fine, you can consider just running off of that, or swapping the internal HDD for a SSD.
The Mid 2011 iMac only has USB2.0, but even with the slow speed, if it is an SSD, it is still very usable. There are a bunch of other external SSD options for you on your Mac, but probably not very cost effective unless you already had the equipment, especially with the M2 MM only costing $500.
If you get to this point and everything is working you want to know other external SSD options for your Mac, let us know.