You might want to look into River, a tiling Wayland compositor inspired by xmonad. Disclaimer, I've not actually used xmonad before so I'm not in a position to compare the two. But River is configured entirely through riverctl commands. Its "config" is an executable, by default at $XDG_CONFIG_HOME/river/init but you can point it to a different path, which can technically be any executable file that just executes when River starts. Ordinarily it'd be a shell script calling all the riverctl commands you want to get your River set up the way you like it, but it could be any executable you like really. You can also use other languages other than shell scripting.
It's still in pretty early development, but I daily drive it for my main general-purpose machine and it works completely fine. I use it for web browsing, coding, gaming, chatting, general productivity, etc, all works. I've noticed some minor hiccups but nothing breaking or unusable. Tbh I would say it's more stable than Hyprland which I've also used and have noticed that Hyprland updates (especially from git) would frequently break it, whereas I was running River compiled from the latest commit of master branch for a while and never had an update break things.