I have kept and continue to keep over six dogs, some of both sexes, together 24/7. When I leave some of the time I segment groups into different rooms. Two in the bedroom four in the main room, puppies in their crates, two in the kitchen, all gated. Shepherds and a pit bull, herder mixes and LGDs, and the weird little frenchbulldog/chihuahua. Only the bullchit and the pit bull ever got into it and it's the little bullchit who's starting it out of his history of fear of pits. I placed the Pit. But if a pack is really, a pack and things are actually worked out in the pack - then a pack can and does live together well. Rescues I'm uncertain of are crated. It's true I would not have Rotts out together and unsupervised, they've a history of spatting with each other or worse as a breed. That's okay, it's their nature and people should understand that.
But NO dog is ever allowed to hump anyone or anything here ever. It may be natural behavior but I don't like it, just like I don't like peeing on my furniture, eating my furniture, or digging in my couch. So it doesn't happen. I've seen a dog that takes it too far, too often start fights in the past and it's not necessary. So not on my watch. And I've seen a dog that grew up somewhere else learn to do it all the time - people, pillows, bedding and other dogs, and do it to a strange dog and get their heads handed to them on a plate. It's NOT polite doggy behavior. I do a ton of rescue, most people who adopt don't like it, strange dogs don't tolerate it, and dogs are dumped in shelters when it becomes excessive or leads to fights, it's undesireable. They also dig where I tell them they can and stop barking when I say to. Those are also natural and undesireable in the wrong place at the wrong time.
Much of which dogs can be packed together and tolerate each other is individual and by breed tolerance for it. It's not common in large bunches of shepherds who are often same sex aggressive - but not all are, it's not common for same sex rotts to be able to form large packs, but individuals also vary. I happen to have kept 6-8 shepherds of both sexes together successfully for the duration of their lives, mother, father, two sons and two daughters and a late addition female. I'm down to a brother/sister and the additional girl, and my rescued weirdnesses, acd/jrt, bullchit, two female pyrs, sigh one leaving Friday to foster then adoption, and lol okay the rescue pups but they're only here for three weeks. They're not mixed in with the group often. But I add in PYRS and other LGDs each month for a week or three, full grown, mid growth or puppy. I rarely have a problem. And with the Pyrs it's usually impressive sounding but little in the way of damage.
Depends on your breed, your time, the individuals and knowing the dogs you do have.