Possibly not the battery at all, it could be related to this problem, I have contacted the factory for comment.
BMW is recalling over 87,000 U.S. vehicles (and thousands more worldwide) from 2020–2024 due to a fire risk caused by a faulty starter motor that can overheat, even while parked. Affected models include various 2–7 Series and X3–X6, plus the Toyota Supra. Dealers will replace the starter for free, with owner notifications beginning March 2026.