Mike pall wrote some posts in various mailing lists over the years that explain some of the things he did (but be aware that they only really scratch the surface)
https://news.ycombinator.com/item?id=11322060
https://news.ycombinator.com/item?id=2588696
http://lambda-the-ultimate.org/node/3851
The thing that makes luajit hard to understand is a combination of two things. First, the jit compiler uses advanced techniques that aren't easy to learn just looking at the code. You really need to know a lot of compiler theory to just get started. Additionally, mike pall wrote a large chunk of luajit in assembly language and hand-optimized lots of things, which gives the code that dense demoscene feeling that was mentioned before.
If you want to learn more about luajit one crucial thing would be learning about tracing jits for dynamic languages (luajit goes all in on tracing jit). The wikipedia article is pretty good. For papers make sure you read "Trace-based Just-in-Time Type Specialization for Dynamic Languages"
https://en.wikipedia.org/wiki/Tracing_just-in-time_compilati...
If you want to dive into a jit codebase one that might be interesting is the Higgs JIT. I haven't looked at the code itself very closely but I read Maxine's PhD thesis and her presentations on jit and I liked her approach of trying to make a jit that is as simple as possible. Most jits these days are massively complex beasts.
https://pointersgonewild.com/higgs/