I figured it out. You had to turn on delete related records in the relationships window on the child side.
No script may be needed.
In the relationships that join the parent table to the other related tables by client ID, you can specify "Delete Related Records in this table when a record is deleted in the other table."
Be careful with this option to make sure that you fully understand the consequences for enabling this option as the resulting "cascading delete" can delete large volumes of related records when you delete a single record in the parent table with no way to "undo" it.