Per T382314#10433215 let's try a proof of concept patch for using the EmailUser API (https://www.mediawiki.org/wiki/API:Emailuser) for sending our Library emails instead of sending them ourselves.
We do still need to retain emails in the library for now for other reasons but could ideally drop the email sending code.
This may involve creating a djmail backend.