I'm going to deal with the first statement, that $CX$ is contractible.
Consider the map $H: X \times{[0,1]} \times{[0,1]}$ $ā$ $X
\times{[0,1]}$ defined by $H((x,t),s) = (x(1-s)t)$. Then $H$ is
continuous and $H((x,0,s) = (x,0)$ for all $xāX$ and $sā[0,1]$.
Here you show that, whenever two points get identified, namely when they are of the form $(x,0,s)$ and $(x',0,s)$ for $x,x'\in X,s\in I$, then they have the same image $[(x,0)]$.
$H$ induces a continuous map $\hat{H}$: $CX \times [0,1] ā CX$ such that
$\hat{H}([(x,t)],s) = [(x,(1-s)t)]$. Now $\hat{H}[(x,t)],0) =
[(x,t)]$ and $\hat{H}[(x,t)],1) = [(x,0)] = X \times${$0$}. So
$\hat{H}$ is a homotopy in $CX$ from the identity on $CX$ to the point
$X \times${$0$}. Consequently, $CX$ is contractible.
All your computations are correct. The function $\hat H$ starts with the identity and ends with a retraction $r:CX\to \{X\times\{0\}\}$ (Note that this is also relative $X\times\{0\}$, it is independent of the time $s$ on that subspace, so you actually have a deformation retraction $r$). The only problem here is that $\hat H$ is continuous only when $q\times\text{id}_I:X\times I\times I\to CX\times I$ is a quotient map. But in general, a product map $q\times\text{id}_Y:X\times Y\to Z\times Y$, where $q$ is a quotient map, is not necessarily a quotient map. Luckily, in your case it is, and this is because $I$ is locally compact and $q\times\text{id}_Y$ is a quotient map for each locally compact $Y$. For a proof see theorem 4.3.2 in the book Topology and Groupoids.
Strictly speaking $G\cdot g$ gives you a path homotopy between $g$ and $f\cdot \overline{g}\cdot g$.
It is clear that you can then collapse $\overline{g}\cdot g$ with a further homotopy, but maybe it is worth adding (!?)
In the converse direction you are implicitly using the same idea. $f\cdot \overline{g}$ homotopies to $f\cdot \overline{f}$ (or to $\overline{g}\cdot g$) and that lets you collapse the latter to the constant path based on $p$.
Best Answer
Take the unit sphere $S^1$ as a subspace of the simply connected space $\Bbb R^2.$
Note that $S^1$ is not a retract of $\Bbb R^2$. Otherwise, it had to be simply connected, too.