Any path in $X$ is a compact subset of $X$, so it cannot lie in infinitely many spheres (I don't know how to reason this).
This is wrong. $H = \{(x_1,x_2,x_3) \in X \mid x_3 = 0\}$ is a copy of the Hawaiian earring. Using Fundamental group of Hawaiian earring is uncountable you will see that there are loops not contained in a finite number of circles, thus not in a finite number of spheres.
Therefore 0 is wrong and 1 and 2 do not make much sense.
I understand that the solution directly follows from an application of van Kampen Theorem, but will this work?
I do not see a direct application of the theorem. This would require to represent $X$ as the union of open subspaces containing the basepoint. But whatever the choice of the basepoint may be, one of these open sets $U$ must contain $x_0 = (0,0,0)$ and thus contain all but finitely many spheres. This does not help us because determining its fundamental group means essentially to know what $\pi_1(X,x_0)$ is (since $U$ retracts to a copy of $X$).
Here is a proof not based on van Kampen.
Let $S^2_n$ be the sphere of radius $\frac1n$ with center $(\frac{1}{n},0,0)$. Define
$$X_n = \bigcup_{m=n}^\infty S^2_m .$$
Lemma. Let $u : I = [0,1] \to X$ be a loop based at $x_0$ such that $u(I) \subset X_n$. Then there exists a homotopy $H : u \simeq u'$ rel. $\{0,1\}$ such that $H(I \times I) \subset X_n$ and $u'(I) \subset X_{n+1}$.
Proof. The set $U = u^{-1}(X \setminus X_{n+1})$ is open in $I$ and does not contain the boundary points $0,1$. The connected components of $U$ are pairwise disjoint open intervals $J_\alpha, \alpha \in A$. Let $x_n = (\frac2n,0,0)$ and $A' = \{ \alpha \in A \mid x_n \in u(J_\alpha)\}$. We claim that $A'$ is finite.
Assume that $A'$ is infinite. Then there exists a sequence of pairwise distinct $\alpha_i \in A'$, $i \in \mathbb N$. Pick $s_i \in J_{\alpha_i}$ such that $u(s_i) = x_n$. Note that by construction each $J_\alpha$ with $\alpha \in A$ contains at most one $s_i$. The sequence $(s_i)$ has cluster point $\sigma \in I$. Since $u$ is continuous, we have $u(\sigma) = x_n$. Thus $\sigma \in U$. Let $\alpha^* \in A$ be the index such that $\sigma \in J_{\alpha^*}$. Since $J_{\alpha^*}$ is an open neighborhood of $\sigma$, infinitely many $s_i$ must be contained in $J_{\alpha^*}$. This is a contradiction.
So let $J_i = (a_i,b_i)$, $i=1,\ldots, k$ be the finitely many components of $U$ whose image under $u$ contains $x_n$. We have $u(a_i) = u(b_i) = x_0$, hence we get loops $u_i : [a_i,b_i] \to S^2_n$ based at $x_0$. Note that the $[a_i,b_i]$ can intersect only in boundary points. The $u_i$ are homotopic in $S^2_n$ rel. $\{a_m,b_m\}$ to the constant loops based at $x_0$. The corresponding homotopies and the stationary homotopy on $I \setminus \bigcup_{i=1}^k J_i$ fit together to a homotopy $G$ rel. $\{0,1\}$ from $u$ to a loop $v$ based at $x_0$ with image in $X_n \setminus \{x_n\}$. Clearly $G(I \times I) \subset X_n$.
$X_{n+1}$ is a strong deformation retract of $X_n \setminus \{x_n\}$, thus we get a homotopy $K : v \simeq u'$ rel. $\{0,1\}$ such that $u'(I) \subset X_{n+1}$ and $K(I \times I) \subset X_n$. Let $H$ be the homotopy obtained by taking first $G$ and then $K$. By construction $H : u \simeq u'$ and $H(I \times I) \subset X_n$.
Theorem. $\pi_1(X,x_0) = 0$.
Proof. Let $u : [0,1] \to X$ be a loop based at $x_0$. Starting with $u_1 = u$, the lemma allows to construct inductively a sequence of loops $u_n : I \to X$ based at $x_0$ and homotopies $H_n : u_n \simeq u_{n+1}$ rel. $\{0,1\}$ such that $u_n(I) \subset X_n$ and $H_n(I \times I) \subset X_n$. Identify $[0,1]$ with $[0,\infty]$ and define
$$H : [0,1] \times [0,\infty] \to X, H(s,t) = \begin{cases} H_n(s,t-n+1) & t \in [n-1,n]\\ x_0 & t = \infty \end{cases}$$
This map is well-defined and obviously continuous on $I \times [0,\infty)$. It is also continuous in all $(s,\infty)$. In fact, let $U \subset X$ be an open neighborhood of $x_0 = H(s,\infty)$ in $X$. It contains $X_n$ for $n \ge n_0$. By construction the $H_n$ take place inside $X_n$, thus $H(I \times(n,\infty]) \subset U$. Clearly $I \times(n,\infty]$ is an open neighborhood of $(s,\infty)$ in $I \times [0,\infty]$.
We have $H(s,0) = H_1(s,0) = u(s)$ an $H(s,\infty) = x_0$.
This shows that $u$ represents the trivial element in $\pi_1(X,x_0)$.
Remark.
The above proof is based on the fact that the inclusion $i_n : X_{n+1} \to X_n$ induces an isomorphism
$$(i_n)_* : \pi_1(X_{n+1}) \to \pi_1(X_n) .$$
This was proved in the lemma. It also follows from the more general theorem in the answer of Under what conditions $\pi_1(X \vee Y) \approx \pi_1(X) * \pi_1(Y)$?