Good question. I’m not sure how you would get a hub motor on a bike with through axles.
AFAIK, they are not designed for that – hub motors are designed for really really low end (usually stamped steel) dropouts, or maybe a big beefy dropout on a mountain bike.
I would probably try to see if a mid drive would fit that bike.