Technically, it is possible to rebuild a Maglite with newer parts, but this might not be a financially viable solution. I know you don’t want a new light, but a new light would be cheaper.

Here is a start:
https://asflashlights.com/

ps: I also have loads of Maglites sitting around…