Using that process for your unit frames would require up to 8 panels to finish each one when all you really need is 4.
You need one panel for your health bar black outline, one panel for your power bar black outline, one panel for the gray behind both health bar and power bar and then one more panel for the black outline behind the gray panel.
Regarding the "merged" borders, as long at the panels are on the same strata they will merge visually when you try to overlap them.
On the party frames for example, each one has 3 panels.
panel 1: black @ strata 3
panel 2: gray @ strata 2
panel 3: black @ strata 1
As long as you keep the same strata scheme for each unitframe, they will visually "merge" when you overlap them.