I had this old patchset: https://github.com/DavidVentura/scrcpy/tree/dev
Which added vnc support directly onto scrcpy, so I could leave a tablet plugged in to my headless server and access the tablet remotely via VNC
The alternative was to use X11vnc but it was janky and had some issues, plus higher cpu usage