My question is not about some particular mathematical problem, but rather about some curious and rather general phenomenon, so it was hard for me to even choose tags for my question, feel free to suggest any change.
I got interested in decomposing object into finite direct sum of indecomposable objects (just like in the Krull-Remak-Schmidt theorem). In more algebraic setting there is an interesting theory about that (theory of Krull-Schmidt categories). I also learned about some other situations where in a given category object has a unique (up to isomorphisms and permutation of factors) decomposition into direct product of finitely many indecomposable factors. Here are examples - finite groups (this is already covered by the Krull-Schmidt theorem), finite connected graphs, connected partially ordered sets (need not be finite) and finite metric spaces (with suitably defined product). There is also some interesting result of similar type in the "Remarks on Decompositions of Categories" by John R. Isbell.
What seems interesting is the fact that in many cases we are dealing with the category of objects of the finitary nature (more precisely what I mean by this is that we can perform there some arguments similar to those mentioned in the following topic If $\lvert\operatorname{Hom}(H,G_1)\rvert = \lvert\operatorname{Hom}(H,G_2)\rvert$ for any $H$ then $G_1 \cong G_2$ ) and where objects are connected in a certain sense. In the case of finite metric spaces, even though they are not connected, the proof that I read relies on the construction of connected "skeleton" of a finite metric space. Of course, these are not really precise conditions.
I am aware that there is already posted unanswered question about the truth of Krull-Schmidt theorem for finite monoids and finite semigroups. However, I would like to ask if you know about any results formalizing that observations or some counterexamples to statements of that type. I suspect that indeed one can find some counterexample, like finite category with non-unique direct product decomposition, but I was unable to do it by myself.