Context
As a follow up of this question and that answer, I would like to identify the special lines separating 3D watersheds. These are useful in the context of astronomy to identify the filaments of the so called cosmic web. In practice, this involves identifying the lines at the intersections of theses surfaces

which are the boundaries of the watersheds of a Gaussian random field
My purpose it to draw something like this:

Given that mathematica 10.0.1 now deals with 3D WatershedComponents I would like to apply some kind of MorphologicalTransform on 3D cubes in order to identify the intersections.
Problem
Say I have a cube such as
dat={{{1, 1, 0, 4, 4, 4}, {1, 1, 0, 4, 4, 4}, {0, 0, 0, 0, 4, 4}, {2, 2, 2, 0, 0, 0}, {2, 2, 2, 0, 3, 3}, {2, 2, 2, 0, 3, 3}}, {{1, 1, 0, 4, 4, 4}, {0, 0, 0, 0, 4, 4}, {0, 0, 0, 0, 4, 4}, {0, 0, 0, 0, 0, 0}, {2, 2, 2, 0, 3, 3}, {2, 2, 2, 0, 3, 3}}, {{0, 0, 0, 0, 4, 4}, {0, 0, 0, 0, 4, 4}, {5, 5, 5, 0, 4, 4}, {0, 0, 0, 0, 0, 0}, {2, 2, 2, 0, 3, 3}, {2, 2, 2, 0, 3, 3}}, {{5, 5, 5, 0, 4, 4}, {5, 5, 5, 0, 4, 4}, {5, 5, 5, 0, 4, 4}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 3, 3}, {0, 0, 0, 0, 3, 3}}, {{5, 5, 5, 0, 4, 4}, {5, 5, 5, 0, 4, 4}, {5, 5, 5, 0, 4, 4}, {5, 5, 5, 0, 0, 0}, {5, 5, 5, 0, 3, 3}, {5, 5, 5, 0, 3, 3}}, {{5, 5, 5, 0, 4, 4}, {5, 5, 5, 0, 4, 4}, {5, 5, 5, 0, 4, 4}, {5, 5, 5, 0, 0, 0}, {5, 5, 5, 0, 3, 3}, {5, 5, 5, 0, 3, 3}}}; (which is the result of the 3D watershed provided by mathematica).
Question
I am interested in identifying efficiently voxels which value is zero AND which is surrounded by at least 3 voxels with different values (zero excluded).
Any suggestions would be welcome!
