Here's an elementary observation that gives a relation between the three sets in both cases.

Note that $M_1\# M_2$ admits degree one maps $\alpha : M_1\# M_2 \to M_1$ and $\beta : M_1\#M_2 \to M_2$ (just crush the other summand).

If $f : M_1 \to N$ has degree $d$, then $f\circ\alpha : M_1\# M_2 \to N$ also has degree $d$. Therefore $D(M_1, N) \subseteq D(M_1\# M_2, N)$ and likewise $D(M_2, N) \subseteq D(M_1\# M_2, N)$ so

$$D(M_1, N)\cup D(M_2, N) \subseteq D(M_1\#M_2, N).$$

If $g : N \to M_1\# M_2$ has degree $d$, then $\alpha\circ g : N \to M_1$ also has degree $d$. Therefore $D(N, M_1\# M_2) \subseteq D(N, M_1)$ and likewise $D(N, M_1\# M_2) \subseteq D(N, M_2)$ so

$$D(M_1\# M_2, N) \subseteq D(M_1, N)\cap D(M_2, N).$$

In general, the inclusions are strict as can be seen by using Jens Reinhold's answer: take $M_1 = M_2 = N = \Sigma_2$ for example.