Lol I've just came on this sub to ask about this. Sunshine has a tutorial in their docs on how to do this on X11 but I'm using sway so I'm kinda fricced. If I start sunshine from ssh, it correctly uses the headless wayland display but it doesn't have rights to access the encoder for some reason.
You can achieve similar (it's gonna be slow though) results with wayvnc. You need export 3 variables in order to set it up according to their FAQ: https://github.com/any1/wayvnc/blob/master/FAQ.md
Edit: noticed your crosspost with answers: https://lemmy.world/post/12888914, thanks for creating this post.
Edit 2: WayVNC can be more usable if you use mosh instead of SSH. It makes VNC less laggy. The downside is that you have to start sway in normal SSH and then start wayvnc in the mosh session, which is kinda inconvenient.