The existing API is roughly imported into Swift and pretty thorny. Some of this can be addressed with a wrapper library but some of it is much more difficult, like addressing AXObserver not having a finished event or callback to signify when it would be safe to do cleanup in a concurrent environment. A Swift overlay could be a great opportunity to make third part assistive tech more accessible.
Hello, this is a good request and I especially appreciate you sharing your experience using the API in their current state.
Please take a few extra minutes and create an enhancement report, and any links / resources / code snippets etc are very welcome.
You can file the feedback here: https://developer.apple.com/bug-reporting/
Once you do, reply with the Feedback ID please.