I recently did something similar, for reacting when the node is updated i used hook_node_presave(). Here's an example on how to send an email when the node is updated and the status is changed from "open" to "pending".
function my_module_node_presave(NodeInterface $node){
if($node->getType() == 'your_content_type_name' AND $node->isNew() == FALSE) {
$status_original = $node->original->get('status_field')->value;
$status_updated = $node->get('status_field')->value;
if ($status_original !== $status_updated AND $status_original == 'open' AND $status_updated == 'pending') {
send_mail();
}
}
}
For creating the send_mail function or whatever you'd like to call it i used the following resource and modified the code where necessary: How to send a mail programmatically in Drupal 8. Also, i used the SMTP Authentication Support module to send the emails using a gmail account: SMTP Authentication Support. The configuration page of the module is on admin/config/system/smtp
.
For checking if a comment has been posted you can use hook_ENTITY_TYPE_insert() and replace "ENTITY_TYPE" with "comment" and inside the hook you can call again the send_mail function.
I did not quite understood how you are storing "all the users on the ticket", but it would be the case of getting the users email address with getEmail();