"When reassembling, do the gears have to put in sync somehow with the current position of the step? Or does it all operate by hitting a hard stop?"
You have to set the motor/gearbox up so that you can insert the pin/cotter pin that holds the bent arm on the stair linkage within the travel of the stairs. That's it. The electronic motor controller senses motor direction and when the stairs are at the end of their upper and lower travel limits. Be careful when putting the motor/gear drive back in. It is easy to pinch hands/fingers in the stair levers and linkage. Support the weight of the stairs so that they don't swing free when the linkage is disconnected. Connect the multi-point pin connector (the power) last. Next time, it's much easier.
Chum lee