https://venam.nixers.net/blog/unix/2019/01/07/win-automation.html
This blog post resonates with Kakoune vision, where a myriad of little tools must collaborate to perform a task.
It offers quite an exhaustive list of utils to select windows, triggers keys and may therefore provide a few good programs to be used in kak scripts.