That's a suppression choke, designed to control the interference caused by sparking between the brushes and the commutator as it rotates. In times-past, this interference - if unsuppressed - could wipe out TV/radio reception over a wide area.
Yours looks like it's come to the end of its useful life - I'd suggest maybe something like this:
https://uk.rs-online.com/web/p/leade...ctors/8807161/
as a replacement?