I took a look at Calibre, but did not realize it could do the job; I’ll take another look.
Sigil looked promising.
I have both Calibre and Sigil. Sigil does a better job of setting up chapters, tables of content, etc. It’s structure is better suited to such things than Calibre, which merely converts from one format to another. Once you have your book in a given format (epub), Calibre will then convert it to any other format.
What I don’t know, because I haven’t tried it, is how Sigil deals with images.