Unfortunately, "a coherent line formatting style" for overlapping dashed edges is not possible for mathematical and technical reasons.

Suppose you have a dash pattern of [4,2], i.e. four pixel long dash, two pixel distance to the next dash. Suppose further, you start one edge at (0,0) and another edge at (0,2), because the corresponding nodes "end" at those coordinates. You cannot start your edges at other coordinates, because they have to start at their nodes. Obviously, the dashes of one line overlap the gaps of the other line thereby creating a "solid" visualization.

While this is just one example, it is possible to create such an example for any strategy you can think of for determining "a coherent line formatting".

Moreover, you are not free to choose any strategy you can think of, because you also need to take into account how time-consuming your strategy is. That really does not leave a lot of options for an approach that works "fast enough" even for thousands of edges.