IIRC there are DSLs that are context free and which compile down to TeX. I just can’t recall at the moment any.. it’s been years. The layout engine inside TeX is second to none. Why throw out the baby with the bath water?
I never encountered a context-free typesetting language that was as powerful as TeX. I assume it would be quite a lot of rather boring work. The main interesting design question would be how to express content and its relationships in some logical way that is distinctive from the algorithmic layouting.
Tex is like a programming language, you have to "run" the program to generate output, and that execution is tightly tied to producing output on paper pages. This means it is extremely difficult to produce good looking HTML, or accessible output.