iMac with a dead internal drive being used as a second monitor - booting and power efficiency
What is the best way to ensure that the 2012 iMac is running at lowest
  power usage and optimal efficiency while in Target Display Mode?


Buy a monitor.

Yes, that's a little tounge-in-cheek, but to run Target Display Mode, you need boot macOS.  When you boot macOS, you're using the CPU and GPU and everything in between (you can use the volume up/down and screen brightness keys on the keyboard so you know Bluetooth is up and running).  


  When it turns on, it automatically tries to boot off the dead internal
  hard drive, which makes the computer crash.


You need to set the startup volume in System Preferences >> Startup Disk


  Once it is booted, is there a way to get it to automatically enter
  target display mode when it is booted?


No.  This is not what Target Display Mode was intended for.  It was intended to be a temporary display option.  If you need something to be a monitor every time you turn it on, buy an actual monitor.

Fix your iMac

It's not economical nor efficient to to use an entire computer as just a screen. An iMac, being an AiO, doesn't change the fact it's very little different than a Mac mini with an external monitor or even a desktop PC.  It wouldn't make sense to fire up an entire desktop setup just to use Target Mode (besides the fact that it already has an external monitor you can disconnect).

You have a failed hard drive in an iMac, which is not an uncommon problem.  Replacing it is very easy and much more economical because you would be getting the full use out of your iMac once again.