Call dnd to toggle Do Not Disturb.
Download | Source
That may not be something fixable, due to the nature of the hackiness required.
I’m on Sierra, but I will update to Mojave. If I look at this, it will be then.
Unlikely. Apple is making automation harder, not easier.
The defaults method. It’s easier if you open the Workflow and see for yourself; it’s straightforwards Bash, and just a few lines.