Just chiming in, agree with what others have said I’ve owned two horses that were gelded late, one at 4, the other at 9.
Never had any stallion like issues with the one gelded at 4. He goes out alone because he’s a turd with other horses, not study, just a turd. And that’s all him.
Now my guy who was gelded at 9, he has never, ever forgotten that he used to be a stallion. Turning him out with a mixed herd is a BAD idea, mounts and penetrates mares, fights other geldings, keeps all other horses away from the water trough and gate. In my defense, because it sounds so stupid and like an obvious result, we tried this with him 3 yrs after he had been gelded, where the best pasture was offered as a mixed herd setting. Oh well.
I used to have to watch my old guy around actual stallions, (one farm I boarded at had a few jumper stallions, competition horses) because he would want to fight them. Even now, almost 20 years since he was gelded, I still have to be unusually careful with with who he is stabled next to, and who his turn out buddies are (does fine with meek geldings). And its taken 15 years for him to quiet down enough to have ANY turn out buddies.
So, I think it has alot to do with the individual horse, but I would avoid a mixed herd with an ex-stud, and personally, I would avoid a mixed herd in general.