Normally, one builds products in a category. Here I am asking about the inverse operation. Let me be precise.
Given a (monoidal) category $\mathcal{C}$ and an object $X$ of $\mathcal{C}$, does there exist objects $X_1$, $X_2$ of $\mathcal{C}$ such that $X \simeq X_1 \times X_2$, $\pi_1:X\rightarrow X_1$ and $\pi_2:X\rightarrow X_2$ satisfying the usual universal property of products.
So the question is: what are the additional conditions on $\mathcal{C}$ so that makes 'factoring' decidable: given an $X$, return either a product cone, or a witness that there are none. Naturally, this will mean first defining a notion of irreducibility, as the unit $\mathbf{I}$ always induces a 'trivial' factorization.
The motivation is a categorical study of pattern-matching, where one needs to be able to test if a (structural) property holds or not. So I am largely interested in syntactic categories where this testing is 'easy', but where I am missing the categorical infrastructure needed to make this generic.