I've been thinking along similar lines on high level - this approach will likely be very general and can be used to create different kinds of media, as well as potentially behaviours in a later stage.
https://metapresent.org/creation-engine
Will be interesting to base it on a decentralised open platform that could be "built-in" in the Internet.