With the top down, try to bring the top up without using the emergency release handle. If it's hard but moves slowly up then it's more than likely a failing hinge lifter seal. This means your hydo system is no longer fully pressurized and can not lift the weight of the roof. However, if lifting the roof is almost rock solid, then the pump on the motor has more then likely failed.
The attached video has a tech changing out a top motor on a Z4. Go to 4:10, you can hear motor running but, the top won't move and can't be pushed down even manually. Since the top can't be brought down even manually the hydo system is good and pressurized. Since you can hear the top motor running, it means that although the motor is good, the pump attached to the motor must have failed.
https://www.youtube.com/watch?v=ADJpC9iOaOI&t=272s
Since the motor has already been relocated to your trunk/boot I'm guessing you've already checked the brass bearing in the pump which ties into the emergency release to make sure it isn't slightly jammed.