@UlrikeFischer The command I use is
make4ht --shell-escape -ulm default -a warning -c nma_mathjax.cfg -e $TEXMFHOME/tex/latex/tex4ht_build_files/MAIN.mk4 $filename.tex "mathjax,htm,fn-in,,notoc*,p-width,charset=utf-8,cut-fullname" "-cunihtf -utf8"
Where there is .cfg and standard make4ht build file from Michal. I think what you are saying about lots of regex seems true, I remmeber now Michal saying something like this long time ago.
But tex4ht is really slow. Painfully so. it takes 3-4 hrs to build one HTML documents when lualatex takes 20-30 minutes for same latex.