if it's possible, have the new version detect if the default templates are used and those placeholders are present, and if someone is using the default ones have the installer overwrite them with the new templates
This is something I had asked myself the very first time I had to edit the templates to remove the backlit to our software. The answer is no. If you do as much as open and save the template you might get its source code formatted differently so it's no longer the same string. Trying to remove all HTML tags and comparing the plain text versions would work BUT it would also replace your templates if you kept the same text and only changed the formatting. Therefore detection is unlikely to work properly.
On top of that, we're moving towards using the Joomla! core MVC for our Joomla 4 extensions. This makes any kind of conditional replacement of database data unlikely.
Joomla 4 does have an email template feature but to those of us who have actually been doing this for more than a decade it looks half-baked. Nevermind the bad user experience or the myriad problems a user would have figuring it out. The biggest problem is that the HTML emails it generates are invalid and caught as spam by SpamAssassin... Of course I didn't expect anything better given who cobbled together this component. Some people have a mouth that's orders of magnitude bigger than their software development talent. Let's just leave it at that.
I'm also seriously contemplating whether it makes sense to have an email template editor using the WYSIWYG Joomla HTML editor. Nevermind that if you edit it with the wrong user you might lose the formatting, it may overwrite your formatting or doesn't allow you to use all tags which could be used in an HTML email. The main problem is the editor only returns the content inside the BODY element of the document it's editing. However, an HTML email needs to be a well-formed HTML document, with an HTML root element, a HEAD and a BODY. Right now we're working around that programmatically but this limits you in the sense that you can't put custom CSS in the HEAD, therefore you can only use inline styles. If you want to do things like dark mode emails you need stylesheets and they don't work across all mail clients when the stylesheet is inside the BODY.
I have tried a solution in Akeeba Subscriptions (the software we use to manage subscriptions on our site). Instead of language strings or email templates in the database we use Joomla view templates. You can override them using Joomla's template management page and even edit them with the code editor provided (they're PHP files, after all). You can also edit them on any code or HTML editor you please and upload them with SFTP / FTP / hosting control panel file manager. They are far more versatile. I think that this is very likely where we'll be heading. It will certainly take some experimentation.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!