The article is presenting a Scheme interpreter running in Scheme, compiled to WASM, not a Scheme compiler, but your idea is also cool. The WASM API apparently doesn't need a pre-made file as its input: you can pass raw bytes generated during runtime into the Module constructor, so it would be totally feasible.
davexunit|2 years ago