According to Macktracker the Mac mini 2014 can display up to 3840 by 2160 pixels at 30Hz or 4096 by 2160 pixels at 24Hz (HDMI) and the Mac mini 2018 up to 4096 by 2160 pixels at 60Hz (HDMI) or 5120 by 2880 pixels at 60Hz (Thunderbolt). I have no idea, if the 30Hz compared to the 60Hz will make much difference.
One issue you´ll likely run into with Photoshop on a Mac (mini) without a separate dedicated graphics card, is that some features like 3d and Canvas rotation probably won't work. For those features, you´d need a Mac with an extra NVIDIA or AMD graphics card.
If I were you, I´d try the Mac mini 2018 if you do have the time for the following experiment: Make security adjustments in
Startup Security Utility to be able booting from an external volume. Beware that Startup Security Utility is not accessible anymore, once you formatted the internal drive to HFS+. So choose the settings wise. I recommend "No Security" and "Allow booting from external or removal media". After regular installation on the internal APFS formatted drive, use Carbon Copy Cloner to clone the internal volume to an external (APFS) volume (can be HDD), format the internal volume to HFS+ and clone the external APFS volume back to the internal HFS+ drive.
Getting Adobe CS5.1 up and running can be demanding, too. You'll need the proper installers, if you don't already have them. Those from the boxed version probably won´t work, as Adobe stopped the activation servers. To obtain the installers that work without activation servers, you can either download them from your Adobe account or you'll need to get the download links from a chat with Adobe stuff (if they still give them away). The installers probably won't run in GUI mode, but they can be executed in Terminal. There might be updates available, that aren't included in the main installers. Depending if you´re really talking about CS5.1, those might be different to the CS5.5 updates. In Adobe Creative Suite 5.5, the version of Illustrator still is CS5.1 (15.1.0) as well as Photoshop is CS5.1 (12.1), but InDesign is CS5.5 (7.5.3.333).
Good luck for successful installing. I´d like to read about your experience…