Convert HTML to Markdown and then to Gemtext.
See https://rimu.geek.nz/a-html-to-gemtext-conversion-api/ for an overview of how to use it.
There is an endpoint to convert HTML straight to Gemtext without exposing the Markdown intermediate data or you can convert HTML -> Markdown and Markdown->Gemtext using more endpoints.