I think a browser is an inverted universal engine. The underlying tech is solid, but on top of it sits the DOM and scripting, and then apps have to build on top of that mess. In my opinion, it would be much better for web apps and the DOM to be sibling implementations using the same engine, not hierarchically related. You wouldn’t use Excel as a foundation to make software, even though you could.
Maybe useful higher-level elements like layout, typography, etc. could be shared as frameworks.
You are thinking along the same lines as me. The fact that the first thing to be standardized was HTML made it a fait accompli that everything had to be built on top of it, since that "guaranteed" <insert grain of salt> cross vendor compatibility.
There are many alternate histories where a different base application layer (app engine) could have been designed for the web (the platform)