Let me recap what I think you are saying...
1. The steps move in and out when you open and close the door with the the external step switch ON. This would be normal.
2. The steps do NOT move in and out when the key is set the the engine run mode and the door is closed. This is how they should work regardless of your step switch setting.
Let me/us know if that is correct. If so, it sounds like the ignition switch interlock (yellow wire) might be the problem.
Kwikee Step Flow chart
ANYWAY...I recently tore my steps totally apart to fix them thinking my motor was bad. After it was all said and done the problem was NOT the motor but a Delphi connector pin (2 wire connector) carrying power from the control module to the motor. Since your motor appears to work under some specific conditions and then not under others, I doubt your problem is the same but double check the connectors leading to the control module.
In my case I was able to simply buy a new pin at NAPA, remove and cut the old connector off, crimp a new pin on and replace pin. I already had a special tool for extracting the pin but it can be done with a jeweler's screwdriver with a little patience. You just have to find the 2 barbs and push them in. BTW...it may be worth consideration to just redo all the pins in the the faulty connector block if that is the case.
Well...that is the best suggestion I can come up with.