Not possible to fully AOT for all applications because you don't know which ones do JIT compilation to generate x86 code at runtime. Many games make use of LuaJIT, for example.
Swapping out is possible only if there are shared libraries though.
For statically linked programs is there anything that can be done?
Valve does a lot of hacks in Proton to make particular games run better. I think swapping a static library might also be possible if you target a particular game.