Sigil https://sigil-ebook.com/ is a a WYSIWYG ebook editor. It does not force you to put the ebooks in a library, it simply behaves as users like. However can modifies the ebup files when read, as moving all xhtml files under the directory Text and modifies the contents.opf file.
Sigil allows to open html and text files and save then as epub. Since sigil is an editor, it allows to add metadata, cover pictures, table of contents, ... . It is worth to edit the html files once imported and converted to epub, especially delete surroundings of the actual text by tables cells or frames.
To convert from other formats as odt, doc, pdf it is recommended to export, convert and save them as html first and import html in a second step.
Sigil shows nicely that epub is a container format, when going to code view html pop's up. Next to html, different items can be added as cover page, meta data and css.