Triggers that affect other tickets from the same company

We have set mails for all devices, such as NAS, firewall status. If the devices briefly lose the Internet connection and are reconnected a few seconds later, as in the case of forced disconnection at night, two tickets are always created. “Connection lost” and “Connection restored”.
It would be great if a trigger could be triggered that only refers to the same organization. This would allow me to easily create triggers when the connection is restored so that all tickets with the matching subject are also closed. Currently, I would have to implement this in a cumbersome way by creating a separate trigger for each company, as otherwise all tickets would be closed across all companies.

We use Zammad Cloud version 6.2.0.2bda00c4e.saas