I'm looking for a very grounded evolutionary justification for the existence of a hermaphroditic sapient and social species, preferably roughly mammalian but not mandatory, which is not as easy as it would appear to justify. In the real word most hermaphrodite species are simple species, and most live in isolated areas where finding another of their species is harder thus increasing the benefit of ensuring the ability to mate with any you find, and/or yourself if none are found in some species.
There is a reason more 'complex' species don't tend to be hermaphrodites (forgive my simplification of referring to species like mammals as more complex, I'm not implying evolutionary levels, just more extensive genetic code). In theory it doesn't cost much for a female to have 'male parts' and be a hermaphrodite. However, if you have a hermaphrodite species some will be naturally better at being a 'male', and these better males will tend to produce more offspring since strong males can produce more offspring then strong females due to lower investment per child. Over time the strong males will 'realize' they benefit more from being a strong male and will focus more and more at securing mates as a male, which usually leads to the males 'losing' the ability to mate as female to instead focus on being better at out-competing others as a male to make them better at producing lots of young. Eventually males split off as separate from hermaphrodite as the only way to compete with other males and then the non-males specializes as females only to be the best at producing children and because they can't compete with specialized males for mating rights.
That's oversimplified explanation above I know it. The point is I want to avoid this issue, to justify hermaphrodite sapient that make sense evolutionary and won't diverge into separate sexes. They must also live socially with no shortage in potential mates.
I would prefer simultaneous hermaphrodites, though I'll accept sequential hermaphrodites IF there is an equal number of both sexes and no cast system where only the strongest/biggest etc transition to the other sex.