if it has water inside it the hole motor will need to be stripped and checked for any corrosion and new bearings fitted if needed.
https://www.ebikemotorcentre.com/repair-overhaul-service/
https://www.ebikemotorcentre.com/product/yamaha-printed-circuit-board/
they can do smd work so might be...