Presumably once the APU is running and or ground power is on, then the batteries are no longer needed, except in an emergency, and could be isolated.
So why not treat them as primary cells and do a swap-out before flight and have the charging system disconnected? The batteries could then be recharged under controlled conditions on the ground and inspected before being used.
That is of course presuming the problem is only due to charging.
I'm probably missing something as it seems too simple a solution, albeit a temporary one.