Battery failsafe caused compass error and lead to crash?

Yes, almost certainly that’s true.

Honestly I’m not sure of the power flag messaging. I was looking around for a common parameter to explain the drop outs and while looking at Vcc saw this parameter that was coincident with the mag health. I would be interested to know what it’s telling us also, perhaps @rmackay9 could comment?