Sounds like the classic tonneau motor issue
fixable by a good DIY-er but a bit of a pain. Alternative is to really feel the pain and give someone who knows about these things money....problem is it takes hours at 70-80 dollars or whatever per hour and the people who know about these things aren't on every street corner. Study the reinforcing kit page, remove yours and re-twist the chassis plate which flexs and allows the gears to skip, giving you that noise. Once you re-twist and re-assemble if your gear is still good you might catch a break. The tonneau gearmotor has to work properly in order for the next step in the sequence to occur, that's the latching of the fifth bow to the tonneau itself, completing the roof up sequence. It's do-able, just takes some patience,
Good luck,
John
1997 900s 2.3 5 speed 'vert