I feel like this should be really easy to prove since $S^1 = [0, 1]/_{0\sim1}$ and for any path $\gamma$ from $x_0$ to $x_0$ we have that $\gamma(0) = \gamma(1)$, but I can't manage to make this precise. Here's my work so far:
Let $x_0 \in X$ be arbitrary and $\gamma, \delta$ be paths from $x_0$ to $x_0$. Any point on $S^1$ can be uniquely represented by $e^{2\pi t}$ for some $t \in [0, 1[$. The map $\gamma': S^1 \to X: e^{2\pi t} \mapsto \gamma(t)$ is continuous because $\gamma(0) = \gamma(1) = x_0$. We can define $\delta'$ likewise. By assumption $\gamma' \simeq \delta'$. Let $H$ be the homotopy, so $H_0(s) = \gamma'(s)$ and $H_1(s) = \delta'(s)$ where we represent a point on $S^1$ by $e^{2\pi s}$ for $s \in [0, 1[$. We define $K_t(s) = H_t(s)$
But I don't know if all steps here are legal, the continuous argument feels fishy and I don't know how to prove $K$ is a homotopy.
If you have that all basepoint preserving maps $S^1 \rightarrow X$ are all homotopic through basepoint preserving homotopies the result follows easily because you can identify basepoint preserving homotopies $S^1 \rightarrow X$ with endpoint preserving homotopies of a path that is a loop.
If you instead have that all basepoint preserving maps $S^1 \rightarrow X$ are all homotopic, but not necessarily through basepoint preserving maps (your case) the result still follows because there is a correspondence between conjugacy classes of elements of the fundamental group and homotopy classes of maps $S^1 \rightarrow X$ (at least in the path component of the basepoint), and a nontrivial group has at least two conjugacy classes. For more information about this correspondence, see Hatcher 4.A
This means if the homotopy type of every map $S^1 \rightarrow X$ is trivial, we know a basepoint preserving nullhomotopy exists from which we can work as in the first paragraph.