This is not possible in the Quillen model structure on topological spaces. (Here I am interpreting in the weak sense: "$f$ and $g$ are left homotopic if there exists some cylinder object $A \amalg A \to C \xrightarrow{\sim} A$ and a map $C \to Y$ restricting to $f$ and $g$". If you restrict to using one fixed cylinder object, like $A \times [0,1]$ or $A$, then the answer depends on exactly which.)
Suppose we have three maps $f,g,h: X \to Y$, $C$ and $D$ are cylinder objects for $A$, $H: C \to Y$ is a left homotopy from $f$ to $g$, and $K: D \to Y$ is a left homotopy from $g$ to $h$. Without loss of generality we may assume that $C$ is a good cylinder object (the map $A \amalg A \to C$ is a cofibration) by factoring $A \amalg A \rightarrowtail C' \xrightarrow{\sim} C$ . We get a map $C \amalg_A D \to Y$ which restricts to $f$ and $h$, and so it is sufficient to prove that $C \amalg_A D$ is a cylinder object: equivalently, that the map $C \amalg_A D \to A$ is an equivalence.
Consider the following diagram of pushouts:
$$
\require{AMScd}
\begin{CD}
\emptyset \amalg A \amalg \emptyset @>>> \emptyset \amalg A \amalg A @>>> \emptyset \amalg D\\
@VVV @VVV @VVV\\
A \amalg A \amalg \emptyset @>>> A \amalg A \amalg A @>>> A \amalg D\\
@VVV @VVV @VVV\\
C \amalg \emptyset @>>> C \amalg A @>>> C \amalg_A D\\
\end{CD}
$$
The bottom-left vertical map is a cofibration, hence so are all the bottom vertical maps. The middle composite is a weak equivalence (disjoint unions of spaces preserve weak equivalences, cofibrant or not), and hence the bottom composite is a weak equivalence (topological spaces are a left proper model category -- pushouts along cofibrations preserve weak equivalences). However, this means that in the composite $C \to C \amalg_A D \to A$, two out of the three maps are equivalences, and hence so is the third: $C \amalg_A D$ is a cylinder object for $A$.