The miracle is that the battery is still chugging along, my guess is that it must be around 70% capacity compared to new. I do realize this was quite a big gamble since who knows how much longer the battery will last.
I wish e-bikes was designed to be more modular and less proprietary so you could easily swap out for example (parts of) the motor and battery for a reasonable sum. As examplified in TFA the frame can last more or less forever and the rest of the parts are changeable and can also last a pretty long time.
Next time I get an e-bike I will probably convert an mechanical bike using a Bafang kit or something like that, since they seem to have more of those traits.