Can't modern Flash compile to HTML5? Can the open alternatives also do that?

I wish SWF became a common HTML5 transpile format.

No, it cannot. It can sort of compile some animations (with the libary EaselJS), but you have to use javascript instead of actionscript - but it is really not the same like it was in flash. Basically it does not work for me and I abandoned Adobe Animate and still looking for replacement of the lost Garden of Flash Utopia.

Flash required a browser plugin to work. It was handling video and 3D animation a decade before the <video> and <canvas> elements were added to the HTML5 spec.

HTML 5 offers nothing to match Flash capabilities.

Perhaps you could render to Canvas/WebGL/WebGPU, but you still need to reproduce the entire engine there.