Dang.
Thank you, Quinn. I think this dashes my hope of creating a small utility. I'm not a Swift coder and AppleScript hasn't worked for this kind of thing for some time. Apple's built-in "everyman tools" such as Automator, Shortcuts and AppleScript aren't really meant to get this deep, even with shell scripting included.
I suppose I could request this type of enhancement, as there are a lot of similar queries online, but I suspect it's too insignificant for Apple to spend time and resources on.
{Sigh}. I long for the days of HyperCard. :)