For a run-down of various hardware KVM solutions that can handle high-resolution video at high refresh rates, see:
https://hardwarerecs.stackexchange.com/q/18561/7591
The UGREEN 8K Displayport KVM Switch has been running flawlessly for four months of continuous use.