Setup: Let $\mathbb C$ be a category. Assume that the span $A \xleftarrow{a} X \xrightarrow{b} B$ has a pushout $A \xrightarrow{\mathsf{pinl}} A \sqcup_X B \xleftarrow{\mathsf{pinr}} B$. Let $f : A \rightarrow C$ and $g : B \rightarrow C$ be such that $f \cdot a = g \cdot b$, which means that there exists a mediating arrow $[\![ f , g ]\!] : A \sqcup_X B \rightarrow C$. Of course, the pushout can be defined as the codomain of the coequaliser $c = \mathsf{coeq}(\mathsf{inl} \cdot a, \mathsf{inr} \cdot b) : A+B \rightarrow A \sqcup_X B$, and $[\![ f, g ]\!]$ appears as the coequaliser mediator for $[f,g] : A+B \rightarrow C$.
Question: Are there any natural general conditions under which $[\![ f,g ]\!]$ factors as $A \sqcup_X B \xrightarrow{???} A+B \xrightarrow{[f,g]} C$? By "conditions" I mean, for example, $\mathbb C$ being a category of a particular kind.
It is the case when $\mathbb C = \mathbf{Set}$, one just needs to pick where to put the elements identified by the pushout. Can I hope for a condition more precise than puffed-up "all epis split"?
Would it help if I said that both $a$ and $b$ are monic? It helps in $\mathbf{Set}$, where for monic $a$ and $b$ I don't need the axiom of choice to construct such a factorisation.
Motivation: I'm working on Adamek et al.'s idealised completely iterative monads. In this context morphisms $Y \rightarrow A+B \xrightarrow{[f,g]} C$ (for specific $A,B,C,f,$ and $g$, of course) have some desired properties. However, I obtained some morphisms of the shape $Y \rightarrow A \sqcup_X B \xrightarrow{[\![ f, g ]\!]} C$, and I'm trying to manipulate them to fit in the theory.