I wondered, Browsers work really well, are already there anyways, have all the GPU stuff etc already dealt with. They also have portal support so Wayland works great.
It could use the Browsers screencast ability on all platforms, and run with Javascript and WASM.
The stuff could be installed in a local Podman container and thus also work natively on Linux.
RecordScreen.io works for me when I want to do that. It's supposed to record locally (I've tried and have seen no data leaving my computer, but maybe should try taking it offline while recording, see if it breaks).