Using computer vision on the video stream (eg via a capture card) and then sending valid mouse and keyboard inputs most definitely has not been around for decades. It's a mechanism to cheat that has zero binaries running on the host computer.
You could do statistical analysis on the mouse and keyboard inputs to try and detect this.
(Very similar to how you might detect chess cheaters, actually.)
You can use (the data of) statistical analysis to train a deep neural network to avoid detection. That may also help avoiding chess detection cheaters, so the moves are not perfect anymore.
Yes. You can't make cheating impossible, but you can make it harder to pull off.