Yes, civ4 was better on that aspect, and, at least, civ5 was moddable on that side.
edit: and, well, "realism" has been slowly banned from the gaming communities because a large majority of players misunderstood the "gameplay trump realism" citation, so tell me, what word should we use now if "immersion" is pointless ?
I mean, it's fine to use these terms, but one should be pretty careful to define it for themselves as not all will agree, so it's kinda pointless to say it's not immersive or something. People can become immersed in anything. I mean "one more turn" and crap. It's like if I told you a game was "shallow". You would ask me "why?" I dislike it when people use highly abstract concepts which are basically circular hot air arguments.
One also has to realize you can make anything look bad if you strip away all the details. Computer games are just pushing buttons and we're just on a stupid rotating tiny rock. So when someone says you're going to win anyways early game and thus nothing matters, it's a true statement, but it's also a pointless one. Games are not just about the end point, I think. Well, for some.
For example, there are some items in the mid or late game that will hurry up your victory. Now, some don't care about that because you'll win anyways. But there is still a certain value in having a more efficient win to others. There are also items that are non-impactful either way, and I think it's worth differentiating between the two. Everyone plays at a different level with different goals in mind and "hurr hurr, you should have been winning since t60" isn't really a definitive argument. It's funny because even some of the biggest sticklers for fast victories and should have been the least open minded realize that.
I really don't think there's much realism given how you know your tech path from the start and understand units in the future. You also have an unbroken line of succession and can never be overthrown. Heck, Sim City would boot you if you ran the economy in the ground.
So yes, a lot of stuff in Civ is historically based, but funny enough people often don't like the realistic stuff. For example, diplomacy is inherently about dealing with humans who can be incredibly irrational and leaders with absolute power would be psychotic. But people don't like that. Why? Well, gameplay.
Gameplay always trumps realism because reality is pretty boring in certain places. It may be realistic for Gilgamesh to see I have no army and thus backstab me, but then the game just dissolves into endless war, and not everyone likes that. We like to pretend some people can be friends. If I wanted to kill everything, there's no end to games with that goal in mind.
Granted 6 isn't that balanced either, but whatever. The man@arms is definitely something that needs to be fixed.
As for Civ 4, I think it had touches that were elegant and simple. Here's one of the differences. Who are you playing in Civ 4? You. You get to name your leader and you get to name your civ. On the other hand, 5-6 makes you play as the designed leaders. It's the difference between you directing a character to do something, and you actually, you know, leading a civ.
And a lot of the stuff in 4 is with this role playing kept in mind. The advisors address you directly, and so do the leaders. What the heck are the advisors in 6? I dunno. It's all impersonal. I want those goofy ones from 2 back.
It's a very small thing, and can be ignored. This is important because this is your game, and you can choose whatever you want. It's also why I really disliked 5 because that game insisted on penalizing you for... well doing anything really. Road maintenance may have been realistic, but it was also terrible. But I'll stop my 5 talk here; I don't consider it Civ at all-- 4 cities lol-- I have Sim City 4 regions bigger than that!
I do find it funny about the min-maxing debate though. Civ 4 is one of the most min-maxed civs there are. Heck, that strategy forum has always been active and despite its age still has active strategy discussion despite being 10 years older. There were absolutely tons of "gamey" mechanics. My favorite victory in Civ 4 is the religious victory, and most people wouldn't even know it existed. (It was called Diplomatic Victory via Apolistic Palace) and is one of the most gamey, abusive things in this franchise.
But it's also awesome. I liked being the pope of a cult that took over the world, even if not really. (it was spread slightly to each of every civ besides mine). Some of us play civ to break it and bend it to our will, after all.

And the game would allow for it. You could expand now or later, but you had to manage your economy. There were no stupid banal arguments like "tall" and "wide". But you could make megacities if you wanted.
Isn't that much more interesting than common talking points like "1upt" and "the AI is dumb"? Or, "This doesn't immerse me?"