There is some very wise guidance in here for software designers. I’ve always been suspicious of solutions that seemed too clever (except maybe my own — a different problem).
How do we identify these pitfalls? Some may need a crystal ball.
There is probably a design principle or insight here that doesn’t rely on clairvoyance. I rhink there is always a limit to layer transparency, but I don’t know how to articulate it.
Perhaps layering is something we need to do wrong a few times to see how to do it right. Network protocol layering, and its software, has clearly evolved. Otherwise the ISO 7 layers would all still apply.