Here is how to derive both results from the Stone-Weierstras theorem. As you say, it's not direct, but not a long way either. Recall these simple applications of the S-W theorem, to be used in PB1 resp. in PB2
The algebra $A$ of rapidly decreasing real analytic functions on $\mathbb{R}^3$ is uniformly dense in the space of continuous functions vanishing at infinity on $\mathbb{R}^3$. This follows from the S-W theorem applied to the one-point compactification $\mathbb{R}^3\cup\{\infty\}$, the $3$-sphere. To check that the above algebra separates points it is sufficient to consider the function $\exp(-\|x\|^2)$ and its translates.
The algebra $A$ of $\mathbb{Z}^3$-periodic real analytic functions on $\mathbb{R}^3$ is uniformly dense in the space of $\mathbb{Z}^3$-periodic continuous functions on $\mathbb{R}^3$. This follows from the S-W theorem applied to the quotient $\mathbb{R}^3/\mathbb{Z}^3$, the $3$-torus. To check that the above algebra separates points it is sufficient to consider the functions $\sin(2\pi x_1)$, $\sin(2\pi x_2)$, $\sin(2\pi x_3)$ and their translates.
Now, given $u\in M$ and $\epsilon>0$, we find $w_i\in A$, such that $\|u_i-w_i\|_{\infty}\le\epsilon$ (for $i=1,..,3$). To define a divergence-free approximation $v=(v_1,v_2,v_3)\in M_0$, we may then take $v_1:=w_1$, $v_2=w_2$ and for all $(x,y,z)\in\mathbb{R}^3$ $$v_3(x,y,z):=w_3(x,y,0)-\int_0^z\big\{\partial_1w_1(x,y,s)+\partial_2w_2(x,y,s)\big\}ds.$$ It is easy to check that, both in problem 1 and 2, $v_3\in A$, that ${\rm div\, } v=0$, and that $v$ is still uniformly close to $u$.