I'd think it's more a matter of bad luck. I can't recall any of the other M240 owners here experiencing anything remotely similar. A few of us, IIRC, also bought demo cameras, including me and I've had none of these problems. Not remotely close.
Sounds like the battery suddenly wasn't taking a charge. These batteries have chips in them and I guess it's possible something could get messed up. In discussions I've had with a Leica beta tester, it was indicated to me that some others had random lock up problems that were resolved with new batteries, implying that some battery batches might be suboptimal.
With your camera being a demo unit, I suppose there is a potential that something is not right with it, though my assumption is it would have been checked by Leica before being sent to the retailer...
I think it's the right move to send it back and try again.