The problem can be fixed by replacing
Window Regulator Gear Plugs - Dorman# 74410
Remove the motor assy, remove the 1 screw holding the gearbox cover in place, remove the cover. You will see the 3 gear plugs, they are either shattered or not round anymore. Be certain to remove all chips and clean things up. The new plugs are a tight fit, don't force anything. Be sure to lube the gears and Plugs. Total cost, about $15.00 from Amazon.
Don't get the old plugs mixed with the new plugs during repair.
FYI - The motor is normally used on automobile power windows. Kudos to Lippert Components for an excellent electro-mechanical step design.
As several have mentioned, it would be good to isolate mechanical issues from electrical. The way that the steps work is that the open and shut position are controlled by monitoring the amount of electrical current that the motor is using when the magnetic door switch is activated. When the steps mechanical mechanism friction increases sharply, the motor electrical current increases and the step controller switches the electrical current off.
So, if the mechanical friction increases either due to hitting the the open or closed mechanical stops (normal operation) or because of lack of grease or damaged/bent mechanism, the electrical controller unit turns the motor off. The steps could be in any position.
Without more info troubleshooting is difficult. The steps will stick for many different reasons,some from increased mechanical friction and some from electrical anomalies I spent several days troubleshooting and finely found that the trouble was in the gearbox inside the motor housing. My steps would chatter and would stop unpredictably. I fixed them for $15 in parts, replacing the 3 clutch dowels inside the motor assembly.
Your step failure description could be due to the same because the dowels (plugs) wear unevenly for opening and closing, possibly causing the steps to freeze closed but not open. The jarring caused by repeated door opening and motor starts could um-wedge stuck dowels, allowing the steps to extend normally. The chattering is the gear plugs spinning instead of the gears, that is what they are there for. No stripped gears because the plugs are acting as a clutch, disengaging the motor from the output shaft.
One thing to notice is when the door is open and the steps extended, does the light over the steps turn on? If yes, the magnetic switch is operating correctly.
Also, my explanation above of how the steps work does not include all of the things that the electrical controller does. There are some timing functions that don't seem relevant to your situation.