Add an option to get text cursor (caret) screen coordinates

It would be very useful if we could get the caret coordinates (if there is a focused text field) and move the mouse cursor there. I've been using this in my AutoHotkey scripts on Windows for a long time and whenever I use MacOS, it's very annoying that there isn't an easy way to achieve this. (At least I couldn't find one...)
It's very beneficial in automating tasks in video editing programs like Premiere Pro, for example, where the layout changes a lot when switching workspaces. Luckily, there are keyboard shortcuts to focus specific panels and there is also a keyboard shortcut to focus the search box - which I could use as a reference position for the mouse cursor to move to - as the layout in the specific panel always stays the same and if I have the bottom screen relative (or application relative) coordinate of the text cursor, for example, it's easy to automate clicking on certain elements from there.