I don't think hitting the sunroof panel will help in any way. There is 4 sliding points, one each corner. The 2 fronts are really just sliders, won't go up or down, just slide back and forth. The motor drives 2 spring/cables, one each side, that attach to each rear corners, through a little lever link. Going backward, the lever link is pulled flat horizontally (lowerong the rear corners), then moving everything backwards. When going forward, another funny shape lever keeps the first lever link down when moving forward, until the front of the panel hits the roof. Then, with the motor still pulling forward, the lever link will tilt vertically (overcomming the level holding it flat) , which raise the 2 back corners.
So, hitting the panel to go down will only risk of breaking the rears lever links.
These lever link parts are the only replacement parts you see to fix defective sunroof mecanism.
There is a clutch between the motor and the spring/cables.
If you remove the motor, you will see the 2 spring/cables, one each side of the track. I don't remember which of the 2 spring/cables goes on which side, but look at motor rotation for "opening", it will indicate how they need to move to open the panel.