Make the HTML into a zip file.
Drag the ZIP file into Calibre
Convert to EPUB - In the dialog that popps up
- Set title and author
- Set Cover
- Do not do heuristic processing
- Under Structure Detection, Blank out the Insert page breaks before regex
Use Calibre to do the MOBI conversion - just uploadig the EPUB seems to lose KDP awareness of the table of contents.
Save To Disk in a Single Directory