I did a front wheel hub motor conversion on a bike with front suspension. I don't know the travel length, but I doubt if it matters much. There have been no issues with it at all. I would recommend installing a torque arm if you do it.
MUST, I REPEAT, MUST, have two torque arms on a front drive! AND pay attention to what size hub motor. I've had a home build customer with a Townie and a 750W DD hub and no problems in 4 years HOWEVER, he doesn't use region braking and is pretty conservation. 20-24MPH max. If using regen, I install two torque arms in two different directions, if you get my drift. So there's protection in both directions. That said, ALWAYS monitor the allow dropouts.