I'm a big fan of Locality of Behavior (LoB): https://htmx.org/essays/locality-of-behaviour/ . I don't think this need be incompatible with SoC. But even if you did think so, I believe that it's better to have everything in one language as much as possible, with the simplest possible specification of marshalling over network boundaries. My view is that hypermedia is a better way to do both of these things.
(I think HTML templating is a historical accident for what it's worth, and I hope it dies.)
(I think HTML templating is a historical accident for what it's worth, and I hope it dies.)