Hi
To join structure layers correctly, you need use functions. It shows which layer have more priority.
You can use functions like this.
Also, for wall where inserted door, you can choose option "disallow join" and after use command "trim\extend" to correct wall end. if it needs
I hope it will help you