It turns out that I had a faulty battery. Replacing it has fixed the problem for me.
The fact that the indicator was freezing when acpi and upower were still returning useful values seems strange, even with a bad battery, so maybe there is still a cryptic bug hidden somewhere. But, in any case, I can't replicate the problem anymore, so probably not worth investigating further.
It turns out that I had a faulty battery. Replacing it has fixed the problem for me.
The fact that the indicator was freezing when acpi and upower were still returning useful values seems strange, even with a bad battery, so maybe there is still a cryptic bug hidden somewhere. But, in any case, I can't replicate the problem anymore, so probably not worth investigating further.