As far as I know, it is clear in the mind of every category theorists (at least, the ones of my acquaintance) that, a category $\mathcal{C}$ comes with the usual axioms and two (mono-valued) maps $dom, codom$ from the class $Ar(\mathcal{C})$ to the class $Ob(\mathcal{C})$ so that if $f\in Hom_C(X,Y)$ is given we have $dom(f)=X,codom(f)=Y$. Now, if $$f\in{\bf Hom}_\mathcal{C}(Y,Z)\cap{\bf Hom}_\mathcal{C}(Y',Z')$$ and $$g\in{\bf Hom}_\mathcal{C}(X,Y)\cap{\bf Hom}_\mathcal{C}(X',Y')$$ we must have $X=X',\ Y=Y',\ Z=Z'$. The situation is very much like in graph theory, for the definition of a Directed Multigraph, a Quiver or an Automaton. I pick the definition in [1].
A Graph (understand Directed Multigraph) $\Gamma$ consists of a set $X=vert\Gamma$ and a set $Y=edge\Gamma$ and two maps $o:\ Y\to X$ (origin) and $t:\ Y\to X$ (target).
This issue is explicitly unearthed and treated in [2] page 11 Remark 1.1.2 (e)
``If $f ∈ \mathcal{A}(A, B)$, we call $A$ the domain and $B$ the codomain of $f$. Every map in every category has a definite domain and a definite codomain. (If you believe it makes sense to form the intersection of an arbitrary pair of abstract sets, you should add to the definition of category the condition that $\mathcal{A}(A, B) \cap \mathcal{A}(A', B') = \emptyset$ unless $A = A'$ and $B = B'$.)''
The (mono-valued) functions are sometimes explicitly set up in the building axioms, see [3] page 11 definition 1.1.1 and, starting from axioms from which the MO could legitimately interpret these ``functions'' as "constructed" whereas they are "thought" as univalued (it is explicit in Serre) in the mind of many category theorists, one can repair this deficiency with triplets as in [4], page 22 Remark 3.2 point (3). I think this last construction can overcome the last construction you mention.
===
[1] Jean-Pierre Serre (1977), Trees, Springer.
[2] Tom Leinster, Basic Category Theory, Cambridge University Press (2014)
[3] Emily Riehl, Category theory in context, Cambridge University Press (2014).
[4] Jiřı́ Adámek, Horst Herrlich, and George E. Strecker, Abstract and Concrete Categories, The Joy of Cats Download Here