I don’t have experience with htmx, but I was there in the 2000s and before.
From what I’ve seen of htmx, we did have something in the same vein back in those days, albeit in a more adhoc manner.
For our part we built a lot of sites that were quite content heavy with a sprinkling of interactivity. Think blogs with comment sections. By the time I stopped doing that, the pattern we had settled on was loading the comments with the page (server rendered html). When someone posted a new comment (json) we returned the rendered comment as html and injected it in place. It worked well because we could share the same template fragment for a single comment and use it in the initial render loop.
As I say, don’t have experience with htmx so maybe my understanding is off.