Sounds like you have some corrosion inside of the mouse from the leaking batteries.
Here's the IFIXIT Magic Mouse Teardown to help show you how to take it apart. Sadly, Apple does not offer any parts so if its to far damaged you'll need to find a junker to steal the parts from or get a new mouse.
Using some white vinegar on a Q-Tip wipe down the spillage until you remove all traces of it. Once you do that go over the same areas with distilled water (not Tap!) to clean off the vinegar as you don't want it to cause more damage. Let the mouse dry out and see if that fixed it.
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
1