I made a somewhat similar prototype by mocking XHR instead of service workers, in https://stackblitz.com/edit/typescript-h3wfwx?file=index.ts
It was fun for a bit to quickly experiment with how htmx works, but I find it difficult to scale in terms of state.