Personally I would try to avoid riding my bikes on sand if at all possible. Getting sand on the chain and gears surely will make them wear out much sooner.
(The same warning for any bike with a chain and gears... e-bike or not.)
The sand and the salt is killer on the bike, and then there's the generally soft riding surface that absolutely saps everything ya got. Give 'er a whirl!
Seems a 'fat-bike' is the right tool for beach sand.