For a Sandbike, a hubmotor with its sealed casing is an ideal choice for motor. Hub motors have been run underwater in tests for days without failure.
Regardless of what your bike is made of, or what your components are made of it is a good idea to hose down your e-bike with fresh water after every ride.