Some of that is solved in my Devcon 2014 demo: Using ExecuteSQL() calls in FileMaker - Soliant Consulting
You can use Get(recordOpenCount) to figure out whether related records are open too.
And while Get(ModifiedFields) only returns fields from the current context you can use a a calc field in the child table to return that for you. Not a big fan of having to add these kinds of fields but it does work nicely.
Check the flowchart that is part of the demo file.
Interesting suggestions... I'll go take a look at your demo, thanks!