You've correctly identified the fact that each individual triangle is contractible, and strong deformation retracts to its "base".
The key thing here is that if you just do the retraction on each triangle, the result isn't continuous, because the sequence of "bristles" on each triangle approach the base of another triangle, so if you start sliding down the bristles without also moving the base, you're essentially "ripping" the structure. I'll leave it as an exercise for you to prove this rigorously.
Fortunately, there's a solution: Slide the base as well! Simply move every point in the base along the zigzag to the right at the same speed you're contracting the triangles. As points in the bristles reach the base, have them turn the corner and start sliding along the zigzag as well, and as points reach the end of one base have them turn the corner on the zigzag and continue to the right at the same speed.
Now there's no "ripping" happening, since each base is going in the same direction as the parallel bristles near it. One characterization I like of this homotopy is: "Each point has a preferred path out to infinity, just tell them to all start to marching."
Once you've moved everything a distance of 1, all the bristles will have been retracted into the zigzag and you've got yourself a "weak deformation retraction" from the full space to the zigzag, and you're done. Note that this isn't a true deformation retraction, since we only got it working by moving points in the zigzag itself, so the base wasn't fixed.
Proving this whole thing is continuous is pretty elementary, and can be done straight from the definitions of homotopy and continuous map, so I'll leave it to you to formalize. I'd recommend breaking it into cases: First show it's continuous for points along the bristles, then show it's continuous for points in the interior of the bases, and finally show it's continuous for points on the corners of the zigzag.
The essence of the counterexample “X homotopy equivalent to Y but X not homeomorphic to Y” is the following. Consider a space $S$ which is homotopy equivalent to a point but is not a point, then attach $S$ to anoter space $R$, then you’ll get (with some few exceptions) a space $R'$ homotopy equivalent to $R$ but not homeomorphic to $R$. (In the counterexample this is the “fourth leg” attached to Y in order to obtain X.) The attaching procedure can be formalized by choosing two points, one in $S$ and one in $R$ and identifying them.
So a good source of understanding what kinds of properties of a space can be ignored by homotopy equivalences, is to focus on spaces that are homotopy equivalent to points but are not points. Such spaces can intuitively be though as spaces than retract on one of its points. For examples any cone is homotopy equivalent to a point. A cone of a space $X$ is the space obtained first by taking the product $X\times [0,1]$ and then by identifying $X\times\{1\}$ to a single point (the vertex of the cone). This provides a huge class of spaces which are homotopy equivalent to points. Note that Y is the cone of three points and X is the cone of four points. Both are homotopy equivalent to a point.
Properties that are invariant under homotopy equivalence, so that one can distinguish two not homotopy equivalent spaces by means of such properties, are for instance those coming from all homotopy groups (the fundamental group and other). This is the core of the theories of invariants in general.
Best Answer
Let us regard $X$ as subspace of $\mathbb C$.
That $X$ and $\overline X$ are not homeomorphic is easy to see: The space $\overline X \setminus \{i\}$ has two path components (proof left as an exercise!), but $X \setminus \{0\}$ has infinitely many path components and for $z \ne 0$ the space $X \setminus \{z\}$ has one path component.
We shall show that the inclusion $i : X \to \overline X$ is a homotopy equivalence.
The idea for constructing a homotopy inverse is this: Map the vertical line $L = \{z \in \mathbb C \mid \text{Re}(z) = 0 \}$ and the "left half circles" $C_n^l = \{ z \mid \lvert z-n \rvert = n, \text{Re}(z) \le n \}$ to $0$ and map the "right half circles" $C_n^r = \{ z \mid \lvert z-n \rvert = n, \text{Re}(z) \ge n \}$ onto the full circles $C_n$ such that the two boundary points $n(1 \pm i)$ of $C^r_n$ are sent to $0$. Let us make this precise.
Define $M = L \cup \bigcup_{n=1}^\infty C_n^l$ and $$H : M \times I \to \overline X, H(z,t) = \begin{cases} n \left(1 + \dfrac{tz-n}{\lvert tz-n \rvert} \right) & z \in C^l_n \\ tz & z \in L \end{cases} $$ The geometric idea for this definition is this: Given $z \in C^l_n$, consider the line $L(z,t)$ through $n$ and $tz$ (which lies on the secant segment connecting $0$ and $z$). It intersects $C^l_n$ in a single point $H(z,t)$. Note that by construction $H( C_n^l \times I) \subset C_n^l$ and $H(L \times I) \subset L$. Moreover $H(z,0) = 0$ and $H(\overline z,t) = \overline {H(z,t)}$. We shall show later that $H$ is continous.
The map $f_n : [0,\pi] \to C_n, f_n(s) = n(1+e^{is})$, is an embedding whose image is the closed upper half circle. Let $R = \bigcup_{n=1}^\infty C_n^r$. The $C^r_n$ are open subspaces of $R$. Therefore $$G : R \times I \to \overline X, G(z,t) = \begin{cases} G_+(z,t) = f_n\left(\frac{2f_n^{-1}(z)f_n^{-1}(H(n(1+i),t)}{\pi}\right)) & z \in C^r_n , \text{Im}(z) \ge 0 \\ \overline{G_+(\overline z,t)} & z \in C^r_n , \text{Im}(z) \le 0 \end{cases}$$ is continuous. The geometric idea for this definition is this: Pull the two the boundary points $n(1 \pm i)$ of $C^r_n$ to the left along the circle $C_n$ until they reach the points $H(n(1 \pm i),t)$. This induces a deformation of $C^r_n$ which takes place inside $C_n$.
Since $H, G$ are defined on closed subspaces of $\overline X \times I$ whose union is $\overline X \times I$ and $H, G$ agree on the intersection of these sets, we get a continuous homotopy $$K : \overline X \times I \to \overline X .$$ Note that $K(X \times I) \subset X$ and $K(z,1) \in X$ for all $z \in \overline X$. Let $$\rho : \overline X \to X, \rho(z) = K(z,1). $$ Clearly $i \circ \rho$ is homotopic via $K$ to $id$, similarly $\rho \circ i$ is homotopic via $K \mid_{X \times I}$ to $id$.
This proves that $i$ is a homotopy equivalence.
Let is finally verify that $H$ is continuous. This is technically somewhat nasty.
Clearly $H$ is continuous in all points of $(M \setminus L) \times I$ because $M \setminus L = \bigcup_{n=1}^\infty \left(C_n^l \setminus \{0\}\right)$ and the sets $C_n^l \setminus \{0\}$ are open in $M$. Let us show that $H$ is continuous in all points $(\zeta,\tau) \in L \times I$. Since $H \mid_{L \times I}$ is continuous, it suffices to consider a point $(\zeta,\tau) \in L \times I$ and to prove that for each $\epsilon > 0$ one has $\lvert H(z,t) - \tau \zeta \rvert < \epsilon$ for all $(z,t) \in M \setminus L$ which are sufficiently close to $(\zeta,\tau)$. To do so, it clearly suffices to show that $$\lvert H(z,t) - t z \rvert < \epsilon \text{ if } (z,t) \text{ is sufficiently close to } (\zeta,\tau) .$$ Let $n$ denote the unique index such that $z \in C^l_n$ and write $z = x +iy$. The point $H(z,t)$ was obtained as the intersection of the line $L(z,t)$ with $C^l_n$. For $z \ne n(1 \pm i)$ the line $L(z,t)$ also intersects $L$ and it is easy to see that the intersection point is $g(z,t) = i\dfrac{nty}{n-tx}$. Note that for $z \in C^l_n \setminus \{n(1+i), n(1-i)\}$ we have $tx \le x < n$. Clearly $\lvert H(z,t) - t z \rvert \le \lvert g(z,t) - t z \rvert$. Straightforward calculations show that $$\lvert g(z,t) - t z \rvert^2 = t^2x^2 + \dfrac{t^4x^2y^2}{(n - tx)^2} \le x^2(1 + \dfrac{y^2}{(n - tx)^2}).$$ Write $\zeta = i\eta$ with $\eta \in \mathbb R$. Then for $\lvert z - \zeta \rvert < \frac{1}{2}$ we have $0 \le tx \le x \le \sqrt{x^2 +(y - \eta)^2} = \lvert z - \zeta \rvert < \frac{1}{2} < n$, thus we are in the situation $z \ne n(1 \pm i)$. Moreover $n - tx \ge n - x \ge 1 - \frac{1}{2} = \frac{1}{2}$ and $\lvert y - \eta \rvert \le \lvert z - \zeta \rvert < \frac{1}{2}$. In particular $\lvert y \rvert < \lvert \eta \rvert + \frac{1}{2}$ and therefore $$\lvert g(z,t) - t z \rvert^2 \le x^2(1 + 4(\lvert \eta \rvert + \frac{1}{2})^2)$$ which completes the proof because $x \to 0$ as $z \to \zeta$.