Now, I'm not an expert here, so I could well be wrong, but...
Calibre's probably the way to focus your efforts, as the quotes to '?' sounds like a encoding issue and it might be able to tweak the conversion there in order to get it working but it'd be tricky to advise without seeing the html source/example.
A straightforward re-zip won't result in a valid ePub - there's a little more than that - see
https://www.mobileread.com/forums/showthread.php?t=55681 for one solution.
You could try something like Sigil to try things, as that should let you produce ePubs from HTML, although not quite as easily as Calibre - not trying to criticize it, as it's targeted at different use cases - but might well be worth a look.