Converse to Hopf degree theorem Below, I mean smooth oriented closed connected manifolds and smooth maps (but am happy to hear about the topological category, or unoriented manifolds, etc instead).
Say that $X^n$ has the Hopf property if two maps $f_0,f_1 : M^n\to X^n$ are homotopic if and only if they have the same degree.
Say that $X$ has the self-Hopf property if the Hopf property holds for $M=X$.
The Hopf degree theorem says that $S^n$ has the Hopf property. It's easy to see that $T^n$ doesn't have the (self-)Hopf property. My question is:

If $X$ has the (self-)Hopf property is it homeomorphic to $S^n$?

 A: A manifold $M$ of dimension $>1$ with $H^1(M) \neq 0$ does not have the self-Hopf property. For if so, then there is a map $f: M \to S^1$ that induces a non-trivial homomorphism $f_*: H_1(M) \to \mathbb{Z}$. Compose this with a map $g: S^1 \to M$ carrying a non-torsion homology class to get a map $M \to M$ that induces a non-trivial map in homology and hence is not null-homotopic. But it factors through $S^1$ and so has degree $0$.
This was a counterexample to an attempted proof that a hyperbolic manifold with trivial isometry group has the self-Hopf property. (Hyperbolic manifolds with trivial isometry group exist, at least in dimension $3$.) The argument is that a map of non-zero degree must in fact have degree one (using Gromov's norm) and hence are homotopic to an isometry. (This uses Gromov's proof of Mostow rigidity; see Haagerup, Uffe; Munkholm, Hans J.
Simplices of maximal volume in hyperbolic n-space. Acta Math. 147 (1981), no. 1-2, 1–11.) So by the hypothesis on the isometry group must be homotopic to the identity.  But the previous paragraph says that this breaks down for degree 0.
A: See the second half of the answer for a complete characterisation of closed orientable manifolds with the Hopf property.

Note that $X$ having the Hopf property is equivalent to the injectivity of $\deg : [M, X] \to \mathbb{Z}$ for every $M$; here $[M, X]$ denotes the free homotopy classes of maps $M \to X$.
If $X$ is simply connected, then for $M = S^n$ we have $[S^n, X] = \pi_n(X)$ - in general we would obtain a quotient of $\pi_n(X)$ by an action of $\pi_1(X)$. With respect to the group operation $\ast$ in $\pi_n(X)$, we have $\deg([f]\ast [g]) = \deg([f]) + \deg([g])$, so $\deg : \pi_n(X) \to \mathbb{Z}$ is a group homomorphism which must be injective if $X$ has the Hopf property.

If $X$ is a simply connected manifold with the Hopf property, then either $\pi_n(X) = 0$ or $\pi_n(X) \cong \mathbb{Z}$. Moreover, if $\pi_n(X) \cong \mathbb{Z}$, then $X$ is a rational homology sphere.

For the final claim, note that $\pi_n(X) \cong \mathbb{Z}$ means that there exists a map $S^n \to X$ of non-zero degree. It then follows from Poincaré duality that $X$ must be a rational homology sphere, see here.
Example: This observation can be used to show that many non-trivial products involving simply connected spheres do not have the Hopf property. For instance, for any simply connected closed manifold $Y$, the product $S^2\times Y$ does not have the Hopf property. To see this, let $n = \dim Y > 1$ and note that $\pi_{n+2}(S^2\times Y) \cong \pi_{n+2}(S^2)\oplus\pi_{n+2}(Y) \cong F\oplus\pi_{n+2}(Y)$ for some non-trivial finite group $F$.

Thanks to Nick L's observation in the comments below, we have a complete characterisation of closed orientable manifolds with the Hopf property.

$X$ has the Hopf property if and only if $X$ is homeomorphic to $S^n$.

Proof: If $X$ is homeomorphic to $S^n$, then it has the Hopf property by the Hopf degree theorem.
Suppose that $X$ is not homeomorphic to $S^n$. Then there is $0 < k < n$ such that $\pi_k(X) \neq 0$. Choose an essential map $f : S^k \to X$ and define $F : S^k\times S^{n-k} \to X$ by $F(x, y) = f(x)$. If $i : S^k \to S^k\times S^{n-k}$ denotes an inclusion into the first factor, then $F\circ i = f$, so the composition
$$\pi_k(S^k) \xrightarrow{i_*} \pi_k(S^k\times S^{n-k}) \xrightarrow{F_*} \pi_k(X)$$
is precisely $f_* : \pi_k(S^k) \to \pi_k(X)$ which is determined by $[\operatorname{id}] \mapsto [f]$. As $f_* \neq 0$, we see that $F_* \neq 0$ and hence $F : S^k\times S^{n-k} \to X$ is essential. Now note that $F = f\circ\operatorname{pr}_1$ where $\operatorname{pr}_1 : S^k\times S^{n-k} \to S^k$ denotes projection onto the first factor. Since $F$ factors through $S^k$ and $k < n$, the map $F$ has degree zero. As $F$ has degree zero but is not nullhomotopic, $X$ does not have the Hopf property. $\square$
A: $\mathbb{CP}^n$ has the self-Hopf property for $n$ odd.
See Theorem 2.2 of Self Maps of Projective Spaces
C. A. McGibbon  Transactions of the American Mathematical Society
Vol. 271, No. 1 (May, 1982), pp. 325-346 (22 pages) available here https://www.jstor.org/stable/1998769?seq=2
By the way it is stated in the topological category but I believe the smooth result follows see https://math.stackexchange.com/questions/1028457/smooth-homotopy. Note that each class has a smooth representative (I think it is the map given by $z_i \mapsto z_i^{\lambda}$ in homogeneous coordinates, $\lambda$ corresponding to McGibbbon's notation )
