Answering that is not easy.
With the hub-drive motor, it is the motor that sets the actual speed of the e-bike, and that speed depends on the PAS assistance level and the throttle position. The rider only adds the additional power by pedalling but he/she has to pedal as fast as to match the motor speed, and that's where the derailleur comes handy (to match the pedalling cadence to the current motor speed).
Now, hub-drive motors like to be spinning fast, so throttling the motor down in Assistance Level 1 makes the motor work in its inefficient region. Thus riding a hub-drive motor e-bike very slowly is not recommended.
The remarks above are for hub-drive motor e-bikes. Mid-drives work on a different principle and can be ridden very slowly if needed.
In any case, slow rides are beneficial to the battery, as there is a little air drag, and far less of the battery charge is used than it is with fast rides.