I couldn’t find almost any tutorials on how to disassemble or service this particular eBike motor (Bafang M400), so I just started removing screws and pulling out parts while taking a ton of pictures.
I found two dirty, rusty bearings that I cleaned and re-greased, along with all the gears, and then put it back together. Not only did I manage to avoid breaking it, but the noise seems to be gone as well. This was by far the most intimidating bike repair I’ve done so far. I’ve serviced every other part before, but I hadn’t dared to touch the motor until now.
It also turns out that the motor is much better sealed than I expected, so I’ll happily continue doing deep river crossings with the motor half submerged in the future, just as I have done until now.
You can get close enough in most situations by looking at bolt size, thread pitch and the material. Some level of intuition and knowledge about what each fastener needs to do is also helpful.