I have replaced the legs twice on my 25 yr old Prowler, both times due to over extending/retraction (I now have a 3 inch white paint mark on the leg top and bottom of travel).
If all that is wrong was a shear pin falling out that is a $0.50 part. It is the most common failure in my experience. I carry spare shear pins although I have used nails for a temporary fix. My connector rod between the legs is the culprit most of the time when it is a shear pin falling out.
If the gears are ate up/shot then they can be fairly cheaply replaced also ($50 on Amazon
link)--depending on how accessible they are. The motor is the expensive part to replace and remount. Especially, if you cannot find an exact replacement motor that will attach to the gear in the same position as the old one.
It is not a hard job but it does take time and being careful to remount the legs where they hold up the frame.