I am curious about the use case? What is it about your databases – or. your concerns about DEVONthink – that would require automating the triggering of these infrequently-used commands on a regular basis?
(Consider also, that the hours spent trying to figure out how to automate a sequence of commands adds up to more time than actually clicking the menu commands themselves over the course of a year or more. Not everything needs automation. Of course, “because I can” is an inarguable rationale LOL.)