It depends on the model and the trail’s upkeep. Generally speaking, it’s frowned upon or outlawed by ordinance in rare instances. Were we to take a team e-bike excursion, we’d definitely stick to paved roads.
Staying off bike trails also serves to protect the folks riding regular bikes, while you fly by them with very little notice for them, possibly causing them to lose control of their bike.