Ecosystems like the african savanna have lots of megafauna which to some extent compete with each other for the same prey/vegetation, but still coexist just fine.
So how do I construct similarly diverse terrestrial ecosystems, while ensuring I don't have too many large carnivores, or any megafauna species which shouldn't be able to coexist?
I'm only concerned with scenarios which are extremely similar to earth and are similarly dominated by mammals and birds including many real modern or near-modern animals. So one needn't consider the sorts of dynamics you get when ectotherm/mesotherm organisms dominate such as they did in the age of dinosaurs.
I'm only really concerned with large animals for this question, because they have high caloric needs and are the part of the ecosystem I'm changing. Smaller animals and and plants are assumed to be similar or the same as those which exist on Earth.
Given those constraints how does one construct plausible ecosystems where all species are getting the calories they need and not being outcompeted by other species?
For the purposes of this question I'm using the definition of megafauna which refers to animals that reach or exceed 90 lbs/40 kg. So when I refer to birds in this question I'm talking about flightless birds which meet that mass. There are however giant flying bats in these ecosystems which do reach that mass limit.
Assume that within this setting human environmental influences are negligible.