It depends on the trailer and the axle. None of it is standardized.
Of the hitches that are axle-mount such that they're intended to fit over a solid axle, some are able to accommodate some flatted hub motor axles such as this. Burley is an example where the hole in the default "Steel Hitch" is 12mm. Flatted hub motor axles are commonly either 12mm or 14mm at their maximum diameter, so they can accommodate some but not all motor hubs. And there are designs that copy the Burley standard hitch design but where the hole in it is closer to 10mm exactly and can't work with any of them.
If you've got a hitch where it could work if only you drilled or filed out the hole, it's not necessarily crazy but it's very much at your own risk, and don't expect a business to help with that for liability reasons. The hitches are thick, hard steel, and shops don't necessarily just have drill bits appropriate to the task either, and doing it neatly with a half-round file is possible but takes time.
If the axle-mount hitch that a particular trailer manufacturer offers doesn't work with your hub motor, it then becomes a question of whether they offer an alternative that works with your bike. Since this appears to be a non-disc brake bike, something like the Burley Classic hitch would probably work, which is a rarity these days.
On your bike the fender bolt could get in the way of the trailer hitch, but it's probably possible to switch it to the inside of the dropout. If it's fixed length you might have to bend it around afterward to align the fender.
EDIT: There are trailer hitch adaptors available for most hub motor axle sizes. These work by replacing the left axle nut completely and providing a piece of M10 surrogate axle sticking out the side for you to attach your trailer hitch to.