But is the base just an AC/DC converter, or does it have a proper charging circuit inside? Just floating a battery on a 5v charger without a charging circuit before hand could be interesting. I’d try to take it apart to find out first.
I guess the labelling would suggest it is just an AC/DC converter. But if you can confirm it’s just a converter then I’d buy something like this and chop the end of the cable off. Then I’d chop the other cable off and solder the two together and individually heatshrink the joints before sealing the whole lot up with some glue lined heatshrink.
Make sure you check the polarity of that plug end before connecting it up. And be particularly careful around water with the cable.