I definitely want to make a macOS version, but I haven’t even looked into it yet. So, I don’t know the level of hacking required. It definitely doesn’t sound like anything Apple would have an api for, so it would probably be a vnc or accessibility api trick.
I think there is an API (that was added with sidecar) to create a virtual display. So at best you could retrieve the framebuffer and then display that. I don't think there is an easy exposed way to get per-window information, aside from doing a screencapture (which likely would not work if you also wanted to hide the window).
Interesting… do you have a link to the docs? The easiest thing prob would be to set the window to be fullscreen, but on that virtual display. That would accomplish per window screen capture.