Could be carbon brushes are worn, so not making sufficient contact, etc. Could also be wiring is shot. Might be an option to renew wiring from solenoids to trim motor. Check out if Yamaha still supply carbon brushes for the motor. You'll need to renew rubber 'o' rings if you open it up. Once in check the general condition of the motor. Sometimes corroded components and electrical points, etc. You'll also need the right specification hydraulic fluid, purge of air, etc.
Battery okay? Multimeter is essential before you strip anything.