Oh wow, that looks like a lot of hackery just to make sendmail work!
PHPMailer in SMTP mode does work, and for in-house scripts that's a totally fine approach. My worry though is that if something like a Magento Cron tries to trigger an email it's entirely possible that this is going to rely on sendmail and just hacking PHPMailer into scripts maintained by other developers to circumvent sendmail reliance isn't an easy task.
I considered setting up a PHP script as a wrapper - something that listens for POST data and uses PHPMailer in SMTP mode to then generate emails, and then stick a custom Bash script where sendmail is supposed to be in the chroot which takes the email and posts it via Curl to this script, but aside from having to then dissect sendmail to figure out how to read the email it's supposed to be receiving, this would create all sorts of mail relay authentication problems that I just don't want to have to think about. I.e. the generated email would always be flagged as originating at my script instead of its true origin. Missing headers, missing DKIM stuff, etc. Not the simple idea it seems.
Thankfully I don't believe we actually have any Cron scripts that ever generate emails on this particular server - I was only testing sendmail for the sake of it.