Dishwasher... I suppose it makes sense. Just be sure to let it dry thoroughly in a WARM place for a LONG time. Moisture left in the coils, especially old coils, could cause minor shorts that'll degrade the motor. The top of a tall shelf in a warm room for a few days should do the trick.
Compressed air would be my first choice. Failing that, brake cleaner is fine, but just beware that some brake cleaners have high acetone content, which would be a no-no, as acetone would probably dissolve the insulation on the magnet wire. Unfortunately, cans of brake cleaner very rarely straight-up list their contents. I believe acetone is more common in the 'non-chlorinated' type. That 'chlorination' is not bleach, btw. It's like perchlorate or something, don't worry about it. I would also beware of high alcohol content ones - they're pretty rare, though - because I'm not sure if it's methanol, which is also a pretty harsh solvent.
Anyway, the best way to know for sure is to spray some of the brake cleaner and smell it. Acetone is pretty easily identifiable by nose. Or alcohol.
Advance/Carquest Wearever brake cleaner is usually what we use in the shop, it fits the bill.