On Stack Overflow, ACTION_CLOSE_SYSTEM_DIALOGS is for system apps and preinstalled apps.
It says that signature permission is required.
It is virtually impossible for ordinary people to obtain signature permission from Google.
It seems possible to install Selenium on Termux, but I haven't tried it.
Since this topic is not really related to MacroDroid, it would be better to ask in the appropriate forum.
If you use Google Contact labels to separate groups, you can branch processing by specifying the group in the Call Incoming trigger.
The image is a simple example, but by changing the If condition, you can create a macro that suits your purpose.