I believe your SSD is failing or possibly the Logic Board since the system seems to be having trouble setting the power state of the SSD. All things being equal, the SSD is the weakest link so a failing SSD is most likely.
For a 2015 iMac, I would also be concerned about the health of the internal hard drive. In any case running macOS from even a healthy hard drive...the performance would be slow. You can check the health of the hard drive by running DriveDx (free trial period). Any "Warning" or "Failing" notices on the hard drive indicates the hard drive is worn out or failing respectively and should not be relied upon. SSDs are different and any "Warning" or "Failing" notices require manual interpretation by someone experienced with SSDs, plus most SSD failures will be due to the SSD's controller failing (their is no health monitoring of the SSD's controller).
If the internal hard drive is too slow or worn out/failing, then you can use an external USB3 SSD instead since replacing either internal drive is not an easy task.