Hi
Still desperate?
I just applied my advice.
I started from your text file converted in odt format and I reproduced the hierarchy I saw on the PDF.
Five to ten minutes.
Here are the odt and the epub made with writer2xhtml
1. Using LibreOffice
2. Exporting as EPUB (thirty seconds?)
Edit: If you aren't using LibreOffice to create ePubs, now's the time to start. It gives you pretty fine-grained control. Once your work is done, you can check it with Sigil.
Hope it helps.