That's a lot of complicated, non-portable steps, with many subtle semantics that can easily be implemented incorrectly.
Running the code in a Wasm sandbox sounds a whole lot easier and less error prone. You do have to trust the Wasm engine, but nothing else. And you don't need in-depth knowledge of OS security mechanisms.
No one cares about portability on the backend. This is a service - github dictates where it runs. I don't see this as being any more complex or involving any more "subtle semantics" than bringing an entire VM and new compiler target along.
Nothing I mentioned requires knowledge of OS security mechanisms beyond what I've described in my short comment.