I once tinkered with trying to force an intransigent app to work better with KM. Here's what I tried. I got myself an HDMI copying adapter which is supposed to take an HDMI output cable and translate the video to some other output cable for input into another computer. These devices exist primarily for people who are trying to illegally copy movies, but that's not what I was doing so I didn't feel bad about getting the adapter. I figured that that way I could accurately read the screen without worrying about hardware access or the issues Peter mentions above. However I ran into a problem. The HDMI output from my Mac had HDCP copy protection. Some HDMI copiers have found keys through illicit channels that could break the CP, but I had purchased one of the legal varieties which was therefore unable to duplicate the HDMI output cable from my Mac.
This is an interesting problem. It's caused because the HDMI output on most Mac computers is HDCP protected. I guess Apple wanted to play nice and prevent bad people from using Mac computers from duplicating HDCP protected videos. But the curious irony is that not ALL Mac computers used HDCP on their HDMI ports. The older Mac laptops used HDMI without any HDCP. I was unable to find one of those older models so I was stuck.
The dumb thing is that the HDCP protocol supports blocking only a PORTION of the HDMI signal. But Apple didn't have the brains or wisdom to implement that. Instead of just blocking video playback in macOS, Apple decided it was best to block the entire screen. Which was totally unnecessary. Apple could have just encoded the video output and achieved the intended result without stopping people who weren't breaking any copyright laws.
If you are REALLY DESPARATE you can track down one of those old Mac laptops before HDCP was implemented on them. Then you can read any screen in macOS with KM with perfect fidelity.