How to handle dangling references to deleted records

I agree.

But apps grow organically, so one app “controls” a table and another app uses that table and has pointers to it. The second app cannot handle the deletion of records except react to them happening. That’s why a more robust way of detecting/handling dangling pointers would be welcome.

Currently I tend to not use links at all, and use ids and handle references myself.