After a certain point, the warmonger penalities will be so high that it doesn't really matter what you try. So I just joint war with someone and usually they don't mind what I do that much. Other than that, I avoid attacking good trading partners and pick targets they don't like. But usually these are the people I want to joint war with. Since the other person in a joint war doesn't care that much about what you do, you're better off just always vying for a joint war and not caring about anything else. If you can win fast then they won't get too jealous of you winning but by that time you can always bop them off as needed.
The thing is in Civ 6, nobody is particularly intresting in dogpiling. In previous games where there was invite to join war, you'd have AIs coming to the aid of their friends or just joining in against you or with you because it's a good opportunity. In 4 for example, if you attacked into a bloc of friends, it would be like fighting them all. Here, they don't really care if their friends die beyond some worthless denouncements or not and just get picked off one by one. It's sorta why diplomacy is a joke in this game.
The result is I don't even casus belli at all after the medieval era. I usually maintain one solid ally, and if the rest disagree, then they can be conquest targets too, so I don't care what they think.
But just in case, get some declarations of friendships going right before you declare war on a target. That way, the other civs can't even denounce you or even get in the way for a long while.
Also, chances for liberation might help a bit since liberating a city will decrease your warmonger penalty. In those cases you might care a bit more.
In addition, it's also not a bad idea to have someone like Gorgo not be your partner since she doesn't care about you going to war in the first place. Ironically, she may even approve especially considering your victims will be forced to concede things to you meaning Gorgo will not like them. In these cases you can sometimes have a 3 way alliance.