TL;DR; PS/2 does not have some of the inherent vulnerabilities of a USB port but it can still be exploited.
Let's at the example of O.MG USB cable. It disguises itself as a common USB cable and runs payloads performing various malicious tasks, like a key logger etc.
You could build a full SOC into the cable where it would run its payloads completely isolated from a host system, just for key logging, running on the 5v/500mA power delivery in case of USB 2.0. A device like this would be completely invisible to the system.
In case of PS/2, first, keyboards do not usually come with detachable cables, so replacing the normal cable with a malicious one would be much harder. There's also a lot less power - twice less, I believe - and using a significant part of it might just cause the connected device malfunction.
So, in theory, you either would need to stealthily resolder a new, malicious cable to the keyboard that looks like the old one, it would likely need to run on its own power which it could recharge when the device is idle, or modify the device in some other way. The device also wouldn't be able to switch modes - mouse and keyboard sockets are typically separate, and a mouse connected to a keyboard socket won't function, and vice versa.
So hacking a PS/2 port would involve a lot more legwork, unless there are vulnerabilities in the architecture I'm not aware of.