Rechargeable battery

I have an electric shaver I use occasionally. I tend to keep it plugged in, unless I happen to remember to unplug it. A few weeks ago I noticed it was hot. I unplugged it then! The LED was red, indicating the charge was low. It ran slowly when I tried the button. The next morning it was completely dead. I assumed a faulty battery. I found that it would run if it was plugged in, and that it no longer got hot. I left it plugged in, and now the LED happily blinks green. It’s not getting hot, and it’s holding a charge.

Something wonky with the battery? Or does the shaver (a cheap Braun) have a discharge cycle, and after five years or so I just happened to catch it this time?