HDD head parking in USB enclosures

If a hard disk is mounted in a powered USB enclosure, when is it safe to turn off enclosure power?

One particular concern of mine is, how do I know if the HDD head is parked? I don’t think it would be good to turn off enclosure power if the head is not parked, unless the enclosure has sufficient residual power to park the head when it senses that power has been cut, and it is smart enough to do so.

Is unmounting in Linux, or “safely removing” in Windows, enough to ensure that the HDD head is parked?