I think you may be overestimating this difficulty, since both the DOM serializer and the Markdown serializer do just this. They don’t preserve the nesting order of the original HTML tags, of course, but that is intentional – it means documents are normalized to a single representation, which is on the whole a desirable property.
No. That ship has sailed.