My process for making printed battery boxes so far has worked great but does require some special hardware. I print them in ABS which is more durable and cheaper than PLA or PETG and can be solvent welded which makes the final product very strong. Interestingly from my tests you can also solvent weld battery wrappings to the ABS so I've been thinking about doing a hybrid pack where the batteries are glued into printed spacers, so not just glued but more stable and flexible design than spacers. The last battery was just the box for cells already in holders and it was two boxes (mounted either side of the bike) each holding a 20S4P pack.
You can buy ABS for $10/kg if you look around and I have printers that are setup to print it so I print most things from it. And unlike the old days even super cheap filament prints very good, not quite as good as the premium stuff which I use too but pretty close. The only issue here is you need a printer with a heated chamber to print anything large from ABS, all of my printers I've modded with insulated heated chambers and run them at 70C. Printers with heated chambers are starting to become more widely available now and I think if I was to buy one now it would be a QIDI Plus 4 and honestly I'm kinda thinking of buying one of those but waiting to see what else is around and see when the release their multi-material system.
Also a heated chamber allows for printing of Nylons which is the other real killer material. At this point I print almost all ABS and Nylons both for personal projects and professionally. With a few very niche exceptions I've found PLA and PETG to be pretty worthless for anything mechanical, they are both very strong in pure tension but are brittle, have terrible crack propagation properties, a pain to work with after printed, can't be glued well, poor temperature resistance, etc.
Ah an I guess heated chamber and high temp nozzles also allows for printing polycarbonate but that's often not worth the effort. My bikes have a ton of printed parts on them almost all ABS with a new Nylons and the only PC parts are the knuckle guard bar ends because I needed just the right material with insane impact perforamnce (for when I clip a tree with them) and high stiffness (so they don't just bend and my knuckles meet the tree anyway). Have to get the good PC though, the real Lexan stuff has stupid impact perforamnce.