As long as you don't submerge the motor in the water, an adequate mudflap, long enough to catch water splash towards the motor is good enough. The only factory ebike I see with such mud flap is the Specialized Vado.
https://electricbikereview.com/forums/threads/front-fender-pet-peeve.23817/