At the risk of appearing to be talking to myself, I've moved forward on this a bit, encapsulating the necessary rawSQL into the relation so I can mostly leverage eloquent query building still.
For the parent, I have defined the following relation:
function oldest_foo_child() {
return $this-hasOne(Child::class)
->whereRaw('birth_date = (SELECT MAX(birth_date) from childs c2 where c2.parent_id = parents.id AND foo = 1');
}
And then I can carry out the filtering query as follows:
Parent::whereHas('oldest_foo_child', function($q) {
$q->where('birth_date', '>', $start_date)
->andWhere('birth_date', '<', $end_date);
});
I abandoned using the scope for Foo, as it would be used externally to the raw conditional, and therefore not always get the right result.
This seems to be enough to move forward (got a deadline to meet), but would still be interested in how other people might approach this