Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ah, I was mistaken about the appropriate terminology for this! I'll edited the question now to clarify. Using the terminology from wikipedia, I mean the notion they call "Sum" (the generalization of disjoint union to multisets) rather than the notion they call "Union"; so, for example, $\{a\}\cup \{a\} = \{a,a\}$. en.wikipedia.org/wiki/Multiset
Let’s allow them to have urelements as members. They should definitely well-founded — we can think of them as functions whose co-domains are sets of cardinals. If it makes it easier, we can restrict our attention to multisets with finite multiplicity, which we can represent as functions onto the natural numbers.
The answer is still "yes" in those cases, for basically the reason you give -- in the case of the monoid of functions with finite support, for any $f, g$ that agree on $B$, there is an $e$ that fixes $B$ and maps every element not in $B$ that is moved either by $f$ or by $g$ to some arbitrary $x\in B$ (provided $B$ is non-empty); we then argue as before. Similarly for the monoid of only finitely non-injective functions.