So... the code for this I'm guessing has to be derivative of how the sector code for Doom actually works, because this isn't just going for a Wolfenstein raycasting system, and it can't be geometry because the code data necessary would be too large; it's actually rendering vertical sectors and sloped paths, with levels that are rather sizable, and with more than one type of enemy. I can't even picture how you crammed all of the necessary sprite artwork, and the level rendering code, and the animation for the exploding barrels.
I had zero clue Pico-8 could manage this.
this is indeed a similar technique as used by Doom - see: https://freds72.itch.io/poom/devlog/241700/journey-to-poom for details and pointers.