Flickering screen on wake up
So I have a late 2012, Qaud core, i7, 2.6 Mac mini that's recently started to behave weirdly.
Its running on the latest Mojave OS and connected to an Apple screen via the display port / USB combination cable.
I bought this 2nd hand about 2 months ago and its been running fine up until the last week or so. It initially ran a fusion drive but I bought it I replaced the small start-up SSD with a 2Tb SSD and split the fusion drive to run the SSD and HD separately.
Over the past 2 weeks however I've been experiencing the following issue.
If I wake the machine after a short sleep, everything is fine but if I wake it after 3-4 hrs or more of sleeping it wakes to a screen that tries to show the login home screen but the screen flickers between that and a black screen. Sometimes it will then settle on the login screen but the majority of the time it settles on black screen and I have to restart the system again to be able to login.
I've connected my MacBook Pro to the Apple screen and the hasn't recreated the issue so I believe that its a Mac mini problem and not a screen connection problem.
I initially undertook the standard fixes: Disk utility, re-set VRAM, re-set SMC but none of these worked.
I then did a complete erase and reinstall of the OS but that hasn't worked either.
My only thoughts now are perhaps a RAM issue or maybe a loose connection somewhere but both of these seem unlikely to me as RAM seems to rarely fail and any loose connections wouldn't recreate the issue so constantly.
I don't think Apple support 2012 models any more so I'm not sure if its worth taking a trip the the Genius Bar or not.
Anyone have any ideas as I've started to run out of ideas?