Moving to InDesign EPUB forum
Why are you editing the sections? Why aren't you leaving the ePub as generated from InDesign?
The book can best be described as a textbook with numerous tables and graphics. The result after exporting from inDesign was, in a word, unacceptable.
By unacceptable, what do you mean? Did the tables and graphics not come out well.
I just did a similar type book with tables. One of the things I found was I had to apply table and cell styles to every element in the table. Also, I had to select graphics and apply Object Export Options to Rasterize container and set the size to Relative to Text Flow or Text Size.
It turned out perfectly. I'd love to see screen shots of what your problems are.
But if you want to edit the code for the book, you're certainly welcome to. I feel it's not necessary.