Thank you all for your insights! I admit my knowledge of ePub is not very deep. I've been troubleshooting based on my workflow, and I'm currently trying to figure out the last step: converting a .zip file back to an .epub. Initially, I assumed that the process I used in Calibre to convert an ePub to a zip file could be simply reversed, but it seems that's not the case.
I attempted to rename my ePub file to .zip, but that approach didn't work. Regarding the LLM translation, that part went smoothly and without errors. I've completed a script segment that employs BeautifulSoup to parse individual HTML files, extracting content from specific tags. The content of the book was within three <div> classes, so the script needed to fetch the content from those specified classes, pass it through the LLM, and use the output to replace the original HTML content. I've been using Google Gemini for this, and it's quite remarkable—it didn't alter any HTML tags, and the formatting remained unchanged when viewing the HTML files.
I've uploaded the translated HTML "website" to GitHub as a demonstration of this part of the process working. You can view it here:
https://gaunc1.github.io/brobromybookishere/.