A tankslapper happens when the steering angle gets out of sync with the lean angle of the bike (and rider). This can happen on a well maintained bike due to the rider or to a good rider due to a badly maintained (set-up) bike.
This rider was able to sort a tank slapper out due to:
i) low speed enabling him to not get out of sync with his corrections
ii) lack of pedals hindering his feet
iii) the fact that he was sitting low, allowing his legs to prevent excessive lean.
https://www.youtube.com/watch?v=YrlZN5DJCf8&feature=related
If you go faster than him don't expect to stay in sync, if you have pedals don't expect them not to hinder you, if you sit high don't expect to prevent excessive lean.
Slop in the system (front/rear/chassis) rider inexperience or road conditions can cause unwanted steering effects even when the bike is upright. When upright, any slip angle, especially of the front tyre, will lead to an induced lean, which will then pitch the bike in the opposite direction to the direction of steering.
Due to the original problem, any correction is likely to be excessive and so the effect increases. Eventually the steering can bounce back and forth from lock to lock with the forces being so great that the rider is unable to control it.
Road conditions are likely to be momentary and so the situation can possibly be saved, slop or inexperience are likely to be longer lasting resulting in a less likely save.
An e-bike usually has tyres that are do not provide as much increase in grip due to larger slip or lean angles as motorcycle tyres, so a tank slapper is less likely, but still possible. The front wheel is more likely to slide out from under you.
Keep your bike frame and wheels properly aligned, maintain the shocks and bearings, be careful where you go fast, and you shouldn't have any problems.