you should just find an aggressive AI CIV and take back a city state or another CIV's city and liberate it
I LOVE when I start a game and there is a weak neighbor who is going heavy wonders. you rush them and take their capital, immediately everyone hates you and is worried about you as a warmonger.
so go find that city to liberate, and it will completely wipe away that penalty. 100 percent. and this is even with a capital. I then leave their other city for that civ to be totally garbage but also a friend and someone to take the brunt of an attack/be the spot of a choke point when another AI attacks
personally I think warmonger penalty is fair. if I am going to take another city I should feel some wrath for it.
or just make the trade for peace, and take their city that way. you don't have many issues if they were the ones who declared war or if you are able to get a group denouncement on that civ it can really help. in my last game I took a capital, liberated a city state, then made a peace deal for another city. I was left with no warmonger penalty, and I was the one who declared war.