Imagine a semisimple abelian category $\mathcal{C}$, for example representations of a finite group. Take two (nonsimple) objects $X, Y$ that are subobjects of a common object $Z$, and decompose them into simples, say $X \cong X_1 \oplus X_2 \oplus \cdots \oplus X_n$ and $Y \cong Y_1 \oplus Y_2 \oplus \cdots \oplus Y_m$. If some of the $X_i$ and $Y_j$ are isomorphic and are being mapped onto the same objects in $Z$, say $X_{i_k} \cong Y_{j_k}$ for $k \in \{1, \ldots K\}$, then $X$ and $Y$ have a common subobject $S$, namely $S := X_{i_1} \oplus X_{i_2} \oplus \cdots \oplus X_{i_K}$ such that $S \hookrightarrow X \hookrightarrow Z = S \hookrightarrow Y \hookrightarrow Z$. It is a maximal object with this property, all other common subobjects are subobjects of it.
This looks a lot like a universal property, but I can't figure out which one. What especially intrigues me that I'm looking not for any objects, but for subobjects. How do I encode that into the universal property?