Removing the motor would make the job ten times easier, I learned this the hard way by routing my brake hose the first time without removing it. It only requires two T40 Torx bolts and three wire connectors, which are easily removed. The torque specification for these bolts is 30 nm. At the same time, I recommend that you inspect the motor bushing and grease the bolts properly to eliminate some noise.
I removed it with the Park Tool CWP-7 crank puller with the larger end, remember to remove the small washer in the crank arm before attempting to pull out the crank. My chainring retaining nut was not properly tightened, I had to torque it back to specification.
You must remove the motor to gain access to the battery.
If you have other questions, feel free to ask.