In the last step, there is one significant mechanism: (let's just say, that it is the last resort mechanism)
When we determine brand, for example MyBrand is a brand name
Hook checks if email template with unique name exists: $currentBrand → name.' '.$emailUniqueName (prefix + space + the same unique name)
If it exists, the hook disables sending email by WHMCS and the module will send email with found template by our own Mailer
(as a result, you will find in logs that email was aborted, and it will not be displayed in the list of emails sent to client)