Excessive current draw due to a bad battery cell can cook a stator. it's happened on Harleys.
A long while back I had read an article by Mat Wiley who authors the Tech section of Rider Magazine saying this very thing. It's what I was thinking. He also wrote it could fry regulators. Since the battery light was on for so long before everything shut down this is what I think caused the event.