I've never been able to get a good LaTeX -> epub pipeline working. There are too many issues with things like tables and splitting code listings across pages -- epubs are just optimized for fiction. I find it's better just to ship a PDF.
My book was a non-fiction novel, so that made life much easier, I only had some tricky image layouts to deal with.