With Bosch, the mechanics are trained and certified, but after a certain point they send components back to Bosch. For example, they are not going to disassemble the actual motor itself (as opposed to the motor unit, gears, etc.).
It is very similar to computer repair. Most manufacturers have diagnostics that will help a repair person identify an issue. If it can be fixed "in the field", they have procedures. If not, they are directed to replace a FRU (Field Replaceable Unit) and send the bad component back for remanufacture/repair. They aren't going to offer stators as a spare part, they are going to offer the entire motor and if the bad one is sent back, they *might* get down to the windings and identify a short. Or, they will just trash the part.
Shimano, I do not know.