Is there a MacOS automation that can detect pixels on screen?
Consider using a visual scripting tool like Eggplant or SikuliX.
SikuliX
SikuliX is an open source scripting tool that detects images and performs actions:

SikuliX automates anything you see on the screen of your desktop computer running Windows, Mac or some Linux/Unix. It uses image recognition powered by OpenCV to identify GUI components and can act on them with mouse and keyboard actions. This is handy in cases when there is no easy access to a GUI's internals or the source code of the application or web page you want to act on.