Many Wayland compositors provide an API to list the windows. I don't know about Plasma 6, but in Wayland it's up to the compositor to provide such API as far as I know.
KWin does as well (workspace.activeWindow, workspace.windowList).
https://unix.stackexchange.com/questions/706477/is-there-a-w...
It, along with the more modern wlroots-based alternative Cage, have become the de-facto Wayland window manager for when you don't actually want to display framed windows, and just want to fork the codebase and display some fullscreen GLES-based graphics in a kiosk instead. These IoT use cases were part of the original motivation for Wayland in the first place.
There should be plenty of alternatives you can run in windowed mode if Weston stops working: https://wiki.archlinux.org/title/Wayland#Compositors