One of the install options is battery inside the seatpost. They sell shims for this mounting. As you have to plan for the E-Tube cables to get from the h-bar area to the derailers, you typically use the B Junction box, which sits somewhere in the lower downtube or bottom of the seat tube. You then use 3 cables out of B Junction for F derailleur, R derailer and battery, then a 4th up the downtube for the A Junction at the stem or H-Bar for the shifter connections.
But really the first question gets answered is do you have a method to route cables internally ? And related, can your b-bracket easily get removed so you can route those cables as well as install a B Junction box ?.
This site has a lot of useful info,
https://di2center.com/hardware-road-and-mtb/