Is it possible to define a foreign key with duplication and cascading delete only if no values exist?
Is this possible to do with FOREIGN KEY constraints, or should I look for another way?


Look another way. I'm not 100% I understand what's happening from that description but ON DELETE CASCADE quite explicitly means "allow the deletion to cascade". There are no buts about it.

Or, just make sure in the app, you check -- in a transaction -- that there are no remaining survey_type's then you can delete and allow it to cascade naturally.