Following and matching the speed of another bike or scooter, whilst waiting to safely overtake, hardly amounts to harassment. The vast majority I overtake don't even know that I'm behind them. Often down to their earphones blocking their sense of hearing. Others, freely engage in conversation when spoken with.
However, let's assume that someone did get upset, and did try to smack me in the mouth, as you put it. I like to think that I'd be ready for any such event and hopefully my dog won't be with me, if anyone is foolish enough to try and do that.
Would you be harassed if an ebike was following you for any length of time Jim? What distance would constitute harassment to you?
Would you assault the rider for following you? Perhaps pull over and let them pass safely could be a more appropriate option? Would you perhaps see it as a challenge to a race and try to speed off? Would you call the police and say; "I'd like to report that I'm being harassed by a bike that has been following my own bike for a couple of miles at the park?"
Are there any options that I've missed? You could always try a crash for cash scenario I suppose. That's very popular right now.
The majority of my alleged 'victims' stop and chat sociably about this and that. Some are even known to me. Or have you not been paying attention?