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 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.