It is really easy with Portal engine.
You can't have master page inheriting another master page, so you have to create 1 master page template for the root node.
For any other level underneath root, you can implement template you need and put content placeholder web part there. So that template would not be master page, but will do exactly the same for you.
Now any child page will inherit whatever is on parent page, and the parent page will inherit Master.
You can do nesting for as many levels as you need.
Does this answer your question?