There is 2 parts to the magic band. The "battery" part is used for ride photos and tracking your every movement. If your touching the band to use it, that doesn't require the battery to work and in theory should work long after your band no longer clasps correctly.
In the past 18 months, we've had 2 different bands stop working for ride photos out of the 20 or so bands wdw has sent us. It's really 7dmt where the band is needed for ride photos, the rest you can use the free hard ticket to tap the screen when you see your photo after the ride.
My experience, about a year the bands become questionable.
EDITED TO CLARIFY:
I just happened to look up on the site to ensure my info was correct, I found this:
If you are wearing your MagicBand, it automatically links attraction photos and videos to your Disney account. If you don’t have a MagicBand, please visit the attraction’s photo preview wall immediately after experiencing the attraction and touch your Disney PhotoPass card, Memory Maker card or annual pass to the touch point next to the preview screen that displays your photo.
MagicBands are required to link attraction videos to your Disney account.
I wish disney had some spot you could stop to find out "is my magic band still good for ride photos" so you don't have to guess. Then it's not guesswork on which bands you might want to replace, especially when they aren't free to replace.