I've had instances where a computer would fail to detect drives because of bad SATA connections.
In fact, I have a 2TB WD "Black", HDD, (ostensibly a high end unit(, which has been particularly nasty about disconnecting with the slightest jostling of its leads.
Something I might suggest, is cleaning the SATA input connections with a simple Q-Tip, soaked in isoprophyl alcohol.
Make sure to take precautions against static discharge, before you go into the machine. (If you didn't already know that).
I had a machine I was trying to use to format a new drive. I left it run overnight, got up, and received an error message, "drive failed to format". It was bricked.
In the meantime, the WD Black disappeared as well. I thought the bad new drive might have destroyed the SATA controller, but it was just a bad connection. Then another volume drive disappeared as well. and the alcohol and Q-Tip trick got that one back up and running also
While I've only had troubnle with the signal leads, there's nothing to say, the same dirt and corrosion issue, can't pop up in the SATA power connectors on the drive as well.
Are you sure all the connectors are pushed in fully? (Sorry, I had to ask).