How can I find the source of a Mac desktop notification?
I may have found the solution, which involves manually deleting a record from an SQL database.

Using Ralf Westphal's answer here and Oscar Zhang's answer here to solve my issue by editing the db file in the db2 folder. I found the app_id in the app table and then deleted it (which causes the 'app_deleted' trigger to delete the app from all the other tables). This is for Mojave. I used an SQLite editor for this (DB Browser for SQLite].

I will have to wait a while to confirm this works.