Hey, bison!
Generally, i like having 7-8 composites and 2 melee if the map dictates some early warfare. The problem is, as you mention - penalties. There is a way around this is you can manage to declare war on your first civ very early. If you do declare war on that civ before meeting others, you won't get warmongering hate from the world.
Let's assume you took one city from that civ. Now it is time to chill out and train your units, but don't take their second city, as that will brand you a menace. Just surround their second city with your units, rotate them wisely and you will get yourself a few logistics composites before turn 100. Some AI's may be unhappy that you took just one city, but this modifier will fade, eventually. Around turn 100 you can take the second city.
If you really want to play nice with everybody, play subtle. Allow for cool down periods after taking each city. There is always stuff to do: hunt down remaining troops, take random shots at cities, hunt barbs, explore, etc.
If you proceed like this, you can go through first half of the game with most AIs liking you. When they realize you are a warmonger, it will be too late.
Basically, any element of world diplomacy can help you mediate penalties with the world, while warring. Trade a lot, propose only resolutions, for which most of the world will be grateful, share intrigue, forgive CS bullying, etc, etc.
As for defense ratings: CBs are good until 25 defense rating. XBs are good until 40. (if you have some ranged XBs by then, well, it's up to 50, i guess). I don't use infantry line much (mostly horses), so maybe people can give their perspectives on how it is done properly with melee.