We did have a technology for adding interactive app-like content to hypertext documents, it was called Flash. I do hope that it gets eventually resurrected but as an open standard. There is an open-source Flash player being actively developed right now, Ruffle. There isn't an open-source authoring program yet, but this feels like a much lesser issue. IMO it's important for there to be that boundary between the "document" and the "app". The only real shortcoming of the original Flash was that it relied on a proprietary plugin.
Of course, Apple also needs to be forced to allow app sideloading, that's regardless of what they do or do not implement in Safari.