Django is a python web framework over 15 years old that's also very similar to what GP wants. For example their apple->box->house query would be something like:
Apple.objects.get(box__house__owner = 'pjs_')
Still have to specify "box", but the actual foreign key relationships are defined on the models so you don't do the full JOIN statements anywhere.
I think EdgeDB [0] is on the right track here. It's a database built on Postgres, but with a different query language. So instead of manually fiddling with JOIN statements, traversing linked tables just looks like dot notation:
[0] https://www.edgedb.com/