The relevant thing here is that before, CSP would protect you even if you failed to sanitize an attacker-controlled input. Bringing in htmx allows the attacker to bypass CSP, and that hasn't been documented well before.
The htmx docs mention CSP in passing but don't explore the nuance that OP does.
I think that's only true if your CSP has the word 'unsafe' or '*' in it. If it doesn't, it shouldn't allow inline code or things from domains that you didn't whitelist.
If you have CSP enabled with standard settings, the attack won't execute. CSP saves you even if you screwed up that badly.
The problem is that even if you keep the CSP settings secure and you add htmx into your app, the attacker can effectively achieve XSS because htmx's functionality is powerful enough that it's mostly equivalent to having arbitrary JS execution:
The htmx docs mention CSP in passing but don't explore the nuance that OP does.