Defense in depth is pretty simple, All it means is not concentrating all the defenses in one line/strongpoint/whatever. Instead the main defenses need to be built a good distance (about the range of a Klink-hammer at least) from whatever they're defending (like a major resource center or staging area). Then, multiple smaller lines are needed behind the main line, and (assuming it can be put there without getting the engineers killed), a lesser line is put in front of the main line. The rearward lines should contain factories.
The main line serves to stop the majority of the enemy force. In the event that the enemy manages to break through the main line, the lines behind it buy time for the engineers to build more defenses along the expected route of the enemy (which is probably where they broke through the main line, unless the enemy is really savvy) and the factories to construct some units to counterattack. The line in front of the main one is purely to try and disrupt the enemy's formation so that they don't get to hit the main line all at once, but instead come in smaller groups (weirdly spaced walls work as part of this). It's a pretty sure bet that this reltively weak front line is going to die. Just rebuild it when the attack is over.