@ItsAShaunParty
The main problem with using the methods described in your linked video is that everything in the video requires a Mac laptop to control the second screen, because the laptop has it's own boot screen.
Your M4 mini would be booting without a display attached unless you already have proper external monitor attached to it to show boot options and login screen.
I would think that you would only get Luna Display to display 5K at a reduced Hz rate, and with increased latency.
All this throws away the main advantage of using an iMac screen panel as an external monitor – 5K sharpness with no latency....
Your choice. 😉
"What is that dongle? Man, I'm so cheap."
In order to use software to drive an external monitor, the Mac has to be connected to a 'dummy display' dongle, which tricks the Mac's GPU into outputting a display signal at the correct resolution. This signal is then sent to the external monitor using software over USB or a WiFi/ethernet network, rather than a DP or HDMI video cable.