Seems to be a control issue
The Yuasa batteries are managed by a Thales control system, allegedly quadruply redundant, which is tasked with monitoring the batteries charging and discharging currents as well as its temperatures.
There are now reports that suggest both aircraft may have had used parts from a bad lot of circuit boards in the battery controller. This seems more plausible to me than two random battery failures.
The real shock imho was the poor containment performance of the design, with fumes vented into the cabin and cockpit as well as ejected battery fluid bathing much of the battery compartment. This was not supposed to happen, fumes were supposed to be vented and fluids contained.
Both the FAA and Boeing should be grateful for this wake-up call and take advantage of the opportunity to do a more jaundiced reappraisal of how well the outsourcing of critical subsystem design and assembly really serves the aircraft buyers and the travelling public.