Yes I think replacing the battery is the best choice as it sounds like your battery is at the end of its lifetime. Especially if it has been through many charge cycles. There are many factors that can effect the lifetime of a battery. Using an incorrect charger to charge the device can shorten the battery life because the battery is likely being supplied with to high of a charge current or to low of current which can eventually cause damage to the battery and possibly the charging IC on the logic board. It's not good for a battery to leave it on a charger for extended periods of time either, because overcharging can cause damage to a battery. Letting a battery discharge to often to the point it turns itself off can also shorten a battery's lifetime. Exposing to extreme temperatures often can shorten a battery's life as well. For a longer battery lifetime one should try to connect to a charger at 20% battery level and remove from charger at around 90%.
The fact that it won't hold a charge long, even though the battery charge indicator software says its at 50% may signal a failing battery. I know a 3.75v battery will fail to power on a device if its voltage falls below 3.4v, which is the point in time the device will power itself off. If the battery discharges quickly after a full charge(within an hour or two) then it should fix the issue by replacing the battery. Sometimes software may cause issues by not properly monitoring the battery's charge levels.
You could also try resetting the device to factory settings before buying a new battery. This may help if it is a software related issue. Make sure to back up any data you want saved before doing a reset.