I had a similar debate with coworkers about returning 404 when a DB webhoook query found no rows. It added extra complexity to client code trying to figure out if it was a bad URL, bad query, or just no rows.
So, 404 would be used in case the database endpoint does not exist at the URL you tried to access it at. A query returning zero rows would be a "success" in HTTP terms.