I'd try adding email logging and see if it is trying to send multiple or if the SMTP server is mistakenly sending more than one email. You could also add a unique id or timestamp to the email body to test if the same email is being delivered twice or if they are different emails entirely.
If the email log doesn't report the script sending more than one copy, or the unique id is the same in the multiple emails, then the issue isn't with your php code itself. The issue is with the SMTP server.
I have heard that some SMTP servers can have a queuing issue that causes repeated emails to send when receiving a large batch. You might try decreasing the batch size or adding a wait between message sending to address this issue.
If you google "smtp sending repeated email", you will see that this is a common issue on some servers and can maybe be fixed by your hosting provider.