So looks like this worked: I replaced all the lines that have "INSERT IGNORE" in both mods with "INSERT ... ON CONFLICT DO NOTHING"
I then ran into issues with SMF not recognizing the new zip files created from Ubuntu 18.04, not sure why, possibly because php zip class isn't fully compatible with the newest zip packages - it created a bunch of zero byte files inside of html/Packages/temp and threw an error, but using tar.gz instead worked.
Both packages are installed on my forum, though I need to test functionality. So if anyone runs into the same issue, I'd suggest trying doing that.
Might be best to have some more code around that detects what the SQL engine is and sends the right commands, but I'll leave that as an exercise for the reader. (That's code for I'm too lazy to do it myself
)
Here's the code for both:
https://github.com/rayarachelian/smf_mailinglist_notifygroups_pgsql