I can speak a bit about the rain and winter piece based on research and my experience with batteries in the cold north.
The Sondors fold XS has a very clever design where basically all major components are water resistant and cables run through the frames body. With some fenders (which they sell or could be found aftermarket) and maybe clever use of vaseline or silicon you can almost guarantee a waterproof bike. I obviously wouldn't recommend submerging the hub motor but the displays, battery, and a hub and those other major components are water resistant.
Also Sondors has been using heatshrink to wrap all their cables so that helps. The Fold XS uses hydraulic brakes which also helps avoid damage due to environment.
As for cold, 40 degrees is nothing for the ebike battery. You mayyyyyybe would see a bit of a drop in capacity but you don't see any real diminished results until you go below freezing. At worst, so up north we can see 0 to subzero temps often, you may halve your range.
So with the Fold XS I have 40-60 mile range so that would still be plenty at 20-30 miles. As Steven said you can charge at work too which is my plan (Not everyone can do this). Also the fold....folds so that makes it way easier to move around. Additionally you could always quickly remove the battery and bring it inside leaving the bike outside.
My plan is to ride this ebike year round and through the snow (sans torrential downpour or blizzard), I do have a car but I'm hopefully to replace it most of the year.
I'll link the bike I'm referring to, definitely not cheap but based on what I would spend building my own, it was well worth it.
https://shop.sondors.com/pages/foldxs
There is definitely a pay to play aspect to this and I would recommend going with a company that has been around for a few years. Sondors has grown a ton in terms of part quality and customer service over the last 5 years. Rad is also a great brand to go with.
I have a student at my elementary school and their family LOVES Rad. They have a Rad wagon which they tow two kids around on, supplies, groceries, thing looks awesome and has great components. I have absolutely seen them dropped off at school in sub-zero temps on the radwagon, it's very cool.
My choice for the fold XS was both to save space so I could throw it in my car, looks based and component based, I want to off-road and beat it up a bit. The Fold XS has some very nice features that I couldn't pass up. Our roads are also crap so I needed the XS's shocks versus the Fold X which is cheaper. Fold X can be had for 999 with the code SONDORS2020 until the end of this month. Not a bad price at all.