You're right that this could be done on LLVM IR. The MinSFI project did exactly that basically, several years ago, but it did not see adoption sadly.
The benefits of wasm over LLVM IR is that wasm has already done the work to define the sandboxed format and build the tooling to compile to it. Wasm is also almost as fast as running normally. (Wasm is also portable and lacks undefined behavior, although for this use case those might matter less.)
See the MinSFI section here which compares it directly to wasm for sandboxing:
https://kripken.github.io/blog/wasm/2020/07/27/wasmboxc.html
And the original MinSFI presentation is here:
https://docs.google.com/presentation/d/1RD3bxsBfTZOIfrlq7HzG...