LD_PRELOAD has nothing to do with the kernel, it's entirely resolved in user space; in this context, it would be used to replace libc functions.
> I think I would literally recompile libc to patch fopen/open/openat
That's literally the functionality that LD_PRELOAD provides without having to recompile libc.