Is this the Retina or non-Retina (aka unibody) version?
Just curious if Filevault was enabled & you were trying to reinstall macOS over top of itself?
I would make sure to erase the whole physical drive to see if that makes any difference. Within Disk Utility you may need to click "View" and select "Show All Devices" before the physical drives appear on the left pane of Disk Utility.
Otherwise with it failing to POST would imply a hardware issue of some sort.
Bad memory or a bad memory slot could possibly cause a POST issue, but usually it would give you repeating beeps. With the non-Retina (Unibody) model, the memory slot nearest the Bottom Case tends to fail a lot due to cracked solder joints. Pressing on the center of the Bottom Case can cause it to Kernel Panic, freeze, or have graphical glitches on screen.
With the non-Retina model, the internal HD SATA Cable tends to have a high rate of failure on the 13" model specifically. I've never seen it cause a Kernel Panic though. You could try installing macOS onto an external USB drive to compare results.
Try running the Apple Diagnostics (some of these older 2012 Macs may not be able to access the online diagnostics because Apple broke that ability years ago with a firmware update).
You can try running Memtest86 to check for bad memory if the Apple Diagnostics don't report a problem. For these older non-USB-C Macs if the default Memtest86 configuration doesn't find a problem, then I find that changing the CPU option to "Round Robin" or "Sequential" tends to reveal problems usually by causing the test/system to freeze.