A battery only lasts so many years. So between cable and housing and battery replacement it probably is a wash long term.
The real question is if in 10 years you still can get a compatible battery. I once replaced a battery on my 3 year old phone and learned Samsung didn't even make batteries anymore and I had to buy a 3rd party battery. It worked OK, but would worry about something that I potentially keep for 10+ years
And in case of physical damage or some malfunction the electronic definitely is more expensive.
If you have to ask about cost, you probably shouldn't afford it....