This sounds like a perfect use-case for automation using recorded macros. The failure (or perhaps solutions exist) is lack of facilities in our desktop OSes.
AFAIK, macOS is the only OS to come with this sort of things out of the box (and that is supposed to work consistently across all applications; good luck with that on Linux).
That is what I had in mind as I wrote it. Sad that many macOS apps now are built with Electron, or we simply use web browsers to access public or internal apps.
Using web browsers to access apps is actually a boon in this regard: the whole UI is exposed via the DOM, and you can use JavaScript to interact with it for macros -- and it's cross platform as it works on any OS that can run a web browser!
In contrast Automator/AppleScript only works on macOS afaict.
But then you got the ugliest DOM. I left FaceBook because I was trying to curate my friends list (2k+) down to only the person I know in the real world. But the Unfriend process was a dark pattern and automating it was more work than it was worth. Instagram was worse.
There is a free Power Automate Desktop for Windows.
Macros are generally locked down in enterprise network environments due to the risk of acting as a malware vector.