Hello,
Sorry you're in this situation.
I have created many scripts with both Golang and PHP to do this kind of data check and manipulation (in your case, just a string search) and insertion/deletion.
My direct experience with Wordpress only involves one plugin update that automatically pulled some newsheadlines into a new blogpost draft. It's not directly related, but I believe it will be easy to use that experience; deleting and editing posts are very similar, as far as the WP Rest API is concerned.
Plus, I love this kind of problem.
I put the deadline at two days because I want to leave wiggle room in case my first approach doesn't work, but I'm pretty confident I'll be able to do it in one. I'll need your login credentials, but otherwise I shouldn't have to contact you very much. Feel free to contact me with more questions.
Thanks,
Andy