Had almost identical problem.
Turned out to be moisture in charging port according to the shop and Shimano Australia. Not much and apparently it doesn't take much to cause it. I have since filled it with dielectric grease. Charger still works fine but hopefully it repels any moisture. Didn't have it happen again and I have done some muddy rides, deep puddles, garden hose washing etc.
Be careful washing or in deeper water, even the plug for the port has a small hole in it so if not careful some moisture may get it.