Another way to handle this is to remove items for a specific domain with
Delete from tblADObjects where domain Like 'custdomain'
I did run into an issue where we tried to remove data for an old child domain and received this error:
The DELETE statement conflicted with the REFERENCE constraint "FK_tblADMembership_tblADObject1". The conflict occurred in database "lansweeperdb", table "dbo.tblADMembership", column 'ChildAdObjectID'.
The statement has been terminated.
We might have had members in the child domain in parent domain groups.