Unfortunately, no, MacOS sandboxing does not allow that type of blocking. Only broad categories like "local" vs "remote", but no selective targeting based on domain names or IPs.
;; in ~/.config/agent-safehouse/no-network.sb
(deny network*)
safehouse --append-profile="$HOME/.config/agent-safehouse/no-network.sb" -- <command>