Bad connections due to the corrosion could definitely be causing signal issues. This could manifest as missing counts of the encoder such that it gives a speed error.
i'm not familiar with contact cleaning using a drill bit; if it is blue or green corrosion, then the easiest way is to soak it in vinegar which will loosen up and dissolve most of it, and a soft bristle brush (toothbrush) can be used to clean the rest.
If it is rusty corrosion, then vinegar will also work but may take repeated cleanings; Also some light oil can help loosen up the rust and it can be scrubbed and brushed out, then clean with soap and water to get rid of the oil, and dry it well.
Inspect the end of the motor for corrosion also, such as from road salt, etc. There is likely more places affected since you found it in the connector.