WebAssembly is better compilation target and runtime than Flash ever was. Many languages can compile to WebAssembly.
I think what you want is an authoring tool like Flash. Why not make that tool? Or if you don't want to make it, Rive's a pretty good animation engine. You can make games with it:
SWF is extremely compact, since it was intended to be used over a dialup connection. Flash worked because the player was preinstalled on the computer.
The newer Ruffle player is a 10MB download in addition to the actual flash file. You get a new freshly downloaded copy of Ruffle from every site that's hosting Flash content.
The internet has very much moved on.
A three minute, 1080p YouTube music video encoded in AV1 video with Opus audio is 30 megabytes. No one bats an eyelash at downloading that.
To prove it, this one has been downloaded 2.6 billion times: https://www.youtube.com/watch?v=ekr2nIex040
To even further prove it, this one has been downloaded 17 billion times: https://www.youtube.com/watch?v=XqZsoesa55w
In retrospect, it turns out the reasons were a load of bollocks. Modern web is 10 times more bloated than Flash ever was, and nobody cares.
Thank God we made the web so much safer!!
There's at least one industry that reaaaaally got fucked with the sunsetting of Flash: e learning