While I am not the biggest fan of Wayland and understand the author, this link in the comments gives some reasonable responses/rebuttals:
https://refi64.com/posts/dont-boycott-wayland.html
They seem to point to https://pipewire.org/ for screen recording. I don't know how well that works out in practice and if there are other solutions for automation