Let $\mathcal{C}$ have products, $A, B \in \mathcal{C}_0$, ${\times}\colon \mathcal{C}^2\to \mathcal{C}$ be the functor that sends objects to their product. Then the induced product ${\boxtimes}\colon (\mathcal{C}/A, \mathcal{C}/B) \to \mathcal{C}/(A\times B)$ is a functor, defined on objects as: $$((X,g),(Y,h)) \mapsto ((X\times_0Y),g\times_1h)$$ and on morphisms as $(f_1,f_2) \mapsto f_1\times_1f_2$. The fact that it is a functor follows from the functoriality of $\times$.
My question is, what are the requirements on $\mathcal{C}$ for $ {}\boxtimes (Z, f) \colon \mathcal{C}/A \to \mathcal{C}/(A\times B)$ to preserve colimits? To avoid making this an XY-question, I want to show that for $\mathcal{C} = \mathsf{Set}$, the partially applied induced product functor distributes over the pointwise coproduct in $\mathsf{Set}/X$. I have proved this manually, but I feel like this should follow from some more general categorical property, and should hold for much more general categories, not just $\mathsf{Set}$. This is the rest of the context:
Let ${+}\colon \mathsf{Set}^2\to \mathsf{Set}$ be the functor that sends objects to their coproduct in $\mathsf{Set}$. Then there is a functor $\oplus\colon (\mathsf{Set}/A)^2 \to \mathsf{Set}/A$ , defined on objects as: $$((X,g),(Y,h)) \mapsto ((X+_0Y),[g,h])$$ and on morphisms as $(f_1,f_2) \mapsto f_1 +_1 f_2$.
The fact that it is a functor follows from the interaction laws of sum and cotupling.
Let $(A,g)\colon \mathsf{Set}/D$, $(B,h_1),(C,h_2)\colon \mathsf{Set}/E$. Then $$ g \boxtimes (h_1 \oplus h_2) \simeq g \boxtimes h_1 \oplus g \boxtimes h_1. $$ ^^This is the theorem I'd like to have a general proof for.