The htlatex way
$ make4ht document.tex "customcfg.cfg, charset=utf-8" " -cunihtf -utf8" "" "-interaction=nonstopmode"
didn't work. Result was:
make4ht:unrecognized parameter: i.
I would also prefer make4ht's own argument system.
$ make4ht -u -c customcfg.cfg document.tex
Maybe this can be achieved by creating custom build file, but documentation (https://github.com/michal-h21/make4ht) for make4ht is somewhat difficult to understand because I don't know lua very well.