How do you retrieve and echo this structure in first place?
I don’t think you can query by something like this (without some wicked SQL), so it would be probably easier to:
- Retrieve parent posts.
- Look up newest child (query, sort by date, limit to one).
- Reorder parent posts accordingly.