I commute only 9km daily, also often with an eBike. In Europe, the motor is only allowed to support: you have to pedal, no just pressing a button or turning a handle. The support is also limited to 25 km/h. You can of course go faster, but not with help from the motor. Saying so this, the one-way takes me pretty much exactly 20 minutes. I charge the bike daily (500wh battery I think), but can probably do 2 days if I start fully charged and fine mind running it fully down to sub 10%. Wish it's 3 years old now.
This is using a normal sized ebike. Foldability is sometimes a serious damper for comfort or range (or both), but doesn't have to be. What in trying to say: Be sure to try it out first, if it can do that distance 2x on a charge, or if you need to bring the charger (probably). Cash you ride that comfortably enough that you can sit on it for 45+ minutes? These kinds of questions...