HTMX is a client side JS file which parses the dom and then interprets it in a certain way and then provides some functionality. However the choice whether someone creates the initial html in a SPA context or a full page refresh is up to the developer. Maybe I want to generate the HTML snippets HTMX processes from the server side in PHP/Python and then have HTMX run it's magic on page load.
Or maybe if the same HTMX logic is put into server side code equivalent which generates , the server side code can generate that extra functionality and only generate the js that is needed eliminating the step of including HTMX on the client side.
nginx/apache work well as secure reverse-proxies, load-balancers/etc. to the application servers.
Complicating them with hooks for a bunch of random APIs is asking for trouble. Let the application servers sit behind them so they don't have to worry about those issues, and nginx/apache don't have to worry about application server issues