My Kwikee step was doing the same thing (loud, ratchety noise and steps would only partially close). I knew either the motor's plastic gear was stripped (highly likely), or the main linkage assembly metal gear was toast (less likely).
I found the Kwikee Service Manual PDF online and found the replacement motor for my particular step on Amazon for around $66 bucks. In less than 30 minutes, I was able to replace the motor myself and problem is now solved!
Here's the video of my repair:
https://youtu.be/jJ4Rt5wJahU I plan to buy another motor and keep it on hand. These motors tend to fail every couple of years (or more often if all the step joints and linkage pin are not lubricated frequently, or RV is not frequently used).