Suppose we have a morphism between short exact sequences of chain complexes valued in an abelian category $\mathcal{D}$, where the left and middle vertical arrows are chain homotopy equivalences $\require{AMScd}$
\begin{CD} 0 @>>> A @>>> B @>>> C @>>> 0\\ @. @V \simeq VV @V \simeq VV @V f VV @. \\ 0 @>>> A' @>>> B' @>>> C' @>>> 0 \end{CD}
The five lemma shows that $f$ is a quasi-isomorphism. Replacing the first two vertical maps with their chain homotopy inverses (assume that the resulting diagram also commutes) induces a weak inverse for $f$, that is, a morphism $g$ such that $H_*(f)$ and $H_*(g)$ are mutually inverse. Is it also true that this weak inverse is a chain homotopy inverse? If not true in general, are there conditions on $\mathcal{D}$ or the chain complexes that would make this true?
Edit: It seems straightforward to show via a diagram chase that this is true if the chain homotopies themselves commute in the diagram. That is, if \begin{CD} 0 @>>> A @> i >> B @>>> C @>>> 0\\ @. @V \simeq V aV @V \simeq V bV @V gf VV @. \\ 0 @>>> A @> i >> B @>>> C @>>> 0 \end{CD} commutes, and $P: a \Rightarrow \mathbf{1}$ and $Q : b \Rightarrow \mathbf{1}$ are chain homotopies such that $Qi = iP$, then $gf$ is chain homotopy equivalent to the identity on $C$. If we assume a similar commutativity condition for $P', Q'$ (the apparent chain homotopies in the other direction) then the result holds. I'm wondering if these assumptions can be weakened, or if they depend on each other somehow.