January 20, 2020 2:27 EST PM
I've checked the cables and the monitors themselves
Does this mean you tried a new working cable and attached the monitor to another system to verify both?
Reset VRAM / PRAM, https://support.apple.com/en-us/HT204063
In case it is software and not hardware, leave the cable and monitor as they are and boot from either the recovery partition, from optical, another internal or external volume or otherwise. Check if a clean MacOS recovery or regular boot volume exhibits the same issue, if not then it could be software,
Of course, how intermittent the issue is will make it easier or more difficult to troubleshoot due to the time it may take to reproduce the issue.
A new machine or not will require you to consider if your current Mac delivers what you need or not and then if not, you have to look at what you can afford and if its worth it.
Hope this helps.