This same exact issue is happening to my wife's car, a 2017 built 1/17 that we bought in April. My wife has a very short commute (2 miles round trip) so the car gets driven 10 miles a week and then typically sits in our driveway over the weekend (my car is usually "first" in the driveway so we drive my car during the weekend). It was over one of these weekends (around 5/20) that the car died and fortunately, the car has died in our driveway everytime. By "died" I mean you had to unlock the door manually and had to jump the car to get it started.
I brought our car to the dealer 3x. First time they just recharged the battery. Second time they told me I had to keep the car charged! (which I disputed and eventually had to show them the C-Max Energi web page on Ford.com that I indeed did NOT need to keep the car charged). The third time they couldn't find the issue and told me I could take the car back. I told them they could keep the car until they find the problem (they gave us a loaner). A few days later they found a Service Advisory had come out on 20-June, #46661, a reprogramming of the TCU. They applied this reprogramming and we just got the car back today. I'll provide updates later this week.
First thing you should do is call Ford Customer Care (1 800 392-3673) to get your problem registered. I did that Friday (6/30) and I've been assigned a rep who will call me back on Wednesday (7/5). The more Ford hears about this issue the more they'll take it seriously and get a SA out for the issue (if 46661 does not solve it). I plan to still get Ford Customer Care involved as I too am thinking Lemon Law if this happens again. I want everything documented because with the Lemon Law you have to deal with Ford directly (although I'm hoping our dealer will "work with us").
TL;DR Happened to me too. There is an SA that was put out 20-Jun (46661) that MAY solve the problem. Contact Ford Customer Service and get your issue recorded with them. I'll provide updates as time goes by.