Sad story. I thought it was the HDD, so I ended up asking someone to reinstall macOS on it using their Recovery, and that worked. The hard drive booted up using their 2012?ish Mac mini. However, putting it back into my iMac resulted in the ominous message I was previously getting (" no bootable device, press any key") .. but how do I press keys when my USB ports decided to stop working the moment this message started showing up (at the end of a massive wipe and reinstall, including wiping bootcamp as far as I recall)? Ports all seem to give power, beyond that I have no idea unfortunately. I tried 4 different USB keyboards to no avail.
I lost my original magic mouse and keyboard during a move, I bought a new keyboard to see if that can solve my problem but so far, nada. Any clue on how to pair these bad boys right at boot?
What's my next move guys? I'm at a loss and I'm sitting on a very expensive brick in a country with no Apple Stores, tearing my hair out.