I might be in the wrong Wayland desktop environment; I couldn’t get it to work reliably. Headless Wayland was really complicated when I last tried it, and quite memory heavy.
Not the GP, but I recall the KeePass password manager using xdotool for its autotype feature. I struggled to get xdotool to work correctly back in 2014 on a Debian 7 personal computer. Not familiar with 'x2x' or 'xev'