Disk spin-down: What program to use and best practice today?

I am not certain to understand everything in your test. Sorry for my ignorance.
Correct me If I am wrong;
In your above code, I see, the device spindown, smartd can’t access the device (this is expected), then the device spinup, smartd still can’t access the device (not expected). Why?
Did you check physically the HDD is in fact spinning? This is why I added hdparm, it reports the real HDD state.

Thank you for your time.