hindesite said:
The discussions I've seen around hub motors all seem to assume dropouts, which excludes most of the better trail bikes that are available.
That's because, AFAIK, except for the http://ebikes.ca Grin All Axle front motor
https://ebikes.ca/product-info/grin-products/all-axle-hub-motor.html
(which as it's name implies, you can use virtually any axle for it--you may have to design an adapter for a specific usage, if the ones they sell for it aren't usable), there aren't any commercially-available hubmotors (other than perhaps those meant for cars and the like, which are not for thru-axles) that aren't designed for some form of "dropout" or clamping/pinching fixture that secures the axle flats against rotation...for almost every single one of those motors, that's the only point on the motor that can be used (without user-modification or axle replacement) to transfer the torque the motor makes to the bike frame and allow the motor to push the bike along.
There are a couple of motors (one by Grin, the other by Heinzmann) that use a round axle and a torque arm that secures to the frame and the axle shoulder instead of using tiny axle flats for torque transfer, but they still aren't thru-axle types.
If a front hub with the Grin AA motor isn't an option, or making and installing your own axle in a "regular" hubmotor, or making adapter plates (torque plates) that bolt to your frame to hold a regular hubmotor to it, then your only other choices are non-hubmotor drives of various types, DIY or commercial, to drive the wheel of your choice via whichever method you prefer (chain, belt, friction, etc).