Sorry to be late to the party, but here's an example of 2 compact simply connected manifolds which have the same homotopy groups, same homology groups, same cohomology ring, and yet are not homotopy equivalent. The examples are motivated by Grigory M's examples:$S^2\times S^2$ and $\mathbb{C}P^2\#\overline{\mathbb{C}P^2}$. His examples are both $S^2$ bundles over $S^2$.
If we extend this further, it turns out there are precisely two $S^3$ bundles over $S^2$. Of course, one is the product $S^3\times S^2$, while another doesn't have a more common name, so I'll just denote it $S^3\hat{\times} S^2$.
Both of these spaces are diffeomorphic to quotients of free linear $S^1$ actions on $S^3\times S^3$. Letting $X$ denote either bundle, we have a long exact sequence of homotopy groups $$...\pi_k(S^1)\rightarrow \pi_k(S^3\times S^3)\rightarrow \pi_k(X)\rightarrow \pi_{k-1}(S^1)\rightarrow ...$$
which can be used to show that $\pi_k(X) \cong \pi_k(S^3\times S^3)$ for $k\geq 2$ and $\pi_1(X) = \{e\}$ and $\pi_2(X) \cong \mathbb{Z}$.
The Hurewicz theorem together with Universal coefficients theorem implies $H^1(X) = 0$ and $H^2(X) \cong \mathbb{Z}$. Poincare duality then forces the rest of the cohomology rings to agree.
Finally, to see $S^3\times S^2$ and $S^3\hat{\times} S^2$ are different, one computes the Stiefel-Whitney classes of their tangent bundles. It turns out $w_2(S^3\times S^2) = 0$ while $w_2(S^3\hat{\times}S^2)\neq 0$. (And all other Stiefel-Whitney classes are $0$ for both spaces). Since the Stiefel-Whitney classes can be defined in terms of Steenrod powers, they are homotopy invariants, so $S^2\times S^3$ and $S^3\hat{\times}S^2$ are not homotopy equivalent.
In my humble opinion, your proof is too much ad hoc. Just show that $f,f' : (X,x) \to (Y,y)$ induced the same homomorphism of groups $\pi_1(X,x) \to \pi_1(Y,y)$ when they are homotopic : this is sufficient, the rest will come from abstract non sense.
Best Answer
No. Consider two spheres $S^n$ and $S^m$ with $n,m>1$. Then $\pi_1(S^n)=\pi_1(S^m)=0$ while $S^n$ is not homotopy equivalent to $S^m$ whenever $n\neq m$ (which can be seen by simple calculation of homology groups).
For more sophisticated example consider the double comb space $X$, which has all homotopy groups trivial $\pi_n(X)=0$, homology groups trivial $H_n(X)=0$ and cohomology groups trivial $H^n(X)=0$, but it is not contractible (it is not homotopy equivalent to a point).