If you're not sending just exactly the necessary HTML to replace the target's HTML; if you need to parse JSON, then even jQuery would be better suited.
The whole idea of HTMX is to get rid of the extra steps.
And since htmx also has template plugins, being able to feed JSON values into it makes sense to me... a similar project, EHTML has this feature.
If you're calling APIs that you have no control over, you do so on your server.
That's the entire point of HTMX: the minimal necessary addition to browsers/HTML to allow HTML REST APIs to update pages without full page loads.
Obviously you _could_, and it might even work well, but I think that's using the tool against its grain.
Htmx is "bring your own backend", but you do have to have a backend, be it Haskell or Zig or Gleam, that talks to your API, and renders HTML.