As JPG said,
Occasional blowing out the accumulated crud may help prevent this.
If done often enough, blowing the dust and debris out of the Headstock will help keep the "crud" out of the motor itself. This will also help keep the dust from "gumming up" other moving parts in the Headstock. It should be done each time you lubricate the Headstocks parts.
It sounds like you have had to open up and clean inside the motor about every four years which may not be a bad idea anyway.