The best thing to remove corrosion from surfaces where electronics are involved is gently wiping it away with a Q-Tip slightly moistened with 99%+ Isopropyl Alcohol (available from electronics parts stores).
It would be better if you could remove the battery to forestall any potential problems but since you can’t do this easily without breaking into the earbuds (see the ifixit Powerbeats Pro Teardown guide) then if you don’t moisten the Q-Tip too much i.e. not dripping and try not to bridge between the two terminals with the liquid etc, it should remove any corrosion. The alcohol will evaporate and leave no residue which could later impact on the electrical connection.
You just have to be patient and take your time and don’t let it get too wet and possibly seep into the earbuds. Allow it to dry before continuing to remove any stubborn corrosion.
Also if possible do not use “rubbing alcohol” as mostly this is <70% IPA, can contain additives and is not as effective.