You can't customize the text. As I said:
As for the message posted to the ticket by the "system" pseudo-user, what you receive by email when a ticket is closed verbosely, it is defined in the language file under the COM_ATS_CLI_CLOSEPOSTMSG key. Unfortunately Joomla does not provide a method for overriding the language files in CLI scripts so you'll have to use the default message.
The e-mails sent are not special. As I said, it's the same email you get when someone posts a reply to a ticket. What triggers the email is NOT the ticket being closed, it's the special post added to the ticket saying that the ticket is closed. That's what triggers the email.
Why "Since it's the first time you ran it, yes, it makes sense that ancient tickets get an automatic email with no content."
You had very old open tickets.
You ran the script.
These old tickets got closed silently, i.e. without anything being posted to them.
When that happens the ticket changes state, i.e. it's not the same as it was before.
This causes the email plugin to trigger.
However, there is nothing to be sent.
So a blank email is sent.
This ONLY happens the FIRST time you run the script and ONLY when you have very old open tickets. Therefore it's a waste of my time adding a special check for that when you can avoid these emails by simply unpublishing the email plugin before running the script for the first time and publishing it again after you're done.
As I said, this only happens ONCE.