To provide an update, for those (few, I know) who may be interested.
The conversion workflow text to html to epub or mobi is now sufficiently tested (I hope). It supports title, author, heading levels, scene breaks, blank lines and italics, and something that might pass as footnotes.
With the plain text files from the Dunyazad Library, or any other plain text files that adhere to their very simple rules, you can use
dthtm myfile[.txt] [-c]
to create the htm file, and then
ebook-convert myfile.htm myfile.epub --epub-inline-toc --level1-toc //h:h1 --level2-toc //h:h2 --language en
or
ebook-convert myfile.htm myfile.mobi --level1-toc //h:h1 --level2-toc //h:h2 --language en
to create an epub or mobi file.
dthtm.exe is my tool (current version: 1.0), to be found on
http://www.dunyazad-library.net/plaintext.htm (together with source code and documentation), and ebook-convert.exe is part of Calibre.
Again, I agree that there are other/better/more powerful/more flexible/well established/etc. solutions available, I just wanted to add my own minimalist one...