painting wall inform the structural wall by intersection area

Hello, I’m trying to create a routine for the painting walls to inform about the structural wall. I tried the method of fetching the joins but in case the painting wall is on top of the structural wall they do not join each other, then this method failed. What is working so far is using the node BoudingBox.GetElementIntersect.
However, in situations like the one in the image, the adjacent cladding walls think they belong to the structural wall next door. Does anyone have a suggestion for this?
What I thought was to find which one has more intersection area, but I’m not sure how to do that.