The forward and aft electronics bays are separate from the forward and aft cargo holds.
IMO, a more robust containment will be the short-term "fix" to lift the grounding order. Per an article in The Seattle Times, Boeing has 90 engineers in Japan at Yuasa assisting in "a complete redesign of the battery".
More stable cathode chemistries have either been developed or have matured since the original Lithium Cobalt Oxide chemistry was chosen. Switching to such a chemistry should both reduce the chance of thermal runaway (due to the higher temperatures needed to be reached) and if they do, they release significantly less heat.