It's not like xdotool is so secure in the first place. X11 is one huge hole from that perspective. Anything can read anything and all your important input can be read by some other window anyway.
This is a totally different issue; Wayland gives up the ability to provide user-aid that prevents an obvious human error. This is not really a security issue, it is a usability issue that can just happen to allow a user to make a security slip-up.
In exchange, Wayland gains… well, nothing really, the idea is that it’ll protect users from malicious programs peeking at other windows on their computer. But in that case situation is already FUBAR, there’s no way to protect a computer that is already running attacks locally on itself.
Right, the idea of running hostile programs on your system is broken by design, Wayland is engaging in folly by trying to protect against it. X11 gives up that pointless quest and, by doing so, at least it can provide some extra user-assistance features (including ones that can help mitigate security related user errors).
In exchange, Wayland gains… well, nothing really, the idea is that it’ll protect users from malicious programs peeking at other windows on their computer. But in that case situation is already FUBAR, there’s no way to protect a computer that is already running attacks locally on itself.