You could create a new ePub with
Sigil and simply copy and paste the text into the default Section0001.xhtml page in Book View mode. Sigil will automatically convert ampersands and other problematic characters to entities.
AFAIK, Calibre can also convert
markdown text files to ePubs.