Yes there are many software vendors that are issuing a warning when you try to delete an object that is referenced somewhere else.
I think they could do it by adding a check to the API endpoint used to delete the object (mailbox in this case) that returns an error if the object is referenced in aliases, for example.
But doing this would also probably break somehow API compatibility for existing control panels using SM API.
Maybe adding an optional paramenter that defaults to false such as "checkReferences" that would only be set to true when called from Admin UI, or control panels that are aware as such a change.
But IMHO, again, I think a first step to workaround this issue would be at least to bounce back if a mail is sent to an alias that has 0 target.
It would at least notify the sender that the mail was not delivered so they can inform their recipients of the issue. At the moment everything is done silently.
I think actually sending to an alias just loops over the list of alias of targets and as there is 0 target it just doesn't enter the loop and exit without any error.
That being said, I now have to create a small script that will check every alias exxisting in every domains we host, to check if they have at least one target....