Welcome to the forum :)
Wow, this hardware is also already retro. However, it can be refurbished for the 2020s.
For the Pi 4 or 5 there has been recently a thread https://retropie.org.uk/forum/topic/36439
If smooth N64 emulation is a must then it is a Pi5.
The current IPAC won't work. But if you are satisfied (also in terms of inputlag) you can use a IPAC for USB. You can also wire the GPIO directly as you have 12 buttons per player. I recently released a project which is compatible with the Pi5 (and earlier).
You will also need some adapters between the Pi's micro HDMI and the monitor connection (VGA, DVI, regular HDMI). Driving a CRT is a different story.
For the Pi 5 you will also need an USB audio device (any C-Media compliant stick will do).
Have fun!