I was immortal/deity in 4 but more so immortal (I won every deity VC on a standard map/speed with random opposition except time however). I'm still torn between the two games somewhat, but have overall moved on more to V.
As a high level player, I can tell you specifically that civ IV was never finished as a game. Vassal state mechanics screwed, luck-based spawn outcomes, "role play" AI that basically meant that some of them didn't try and could feed other AI into monsters, control glitches, hammer overflow problems, imbalanced and ill-conceived events, and much more all existed in the final 3.19 BTS patch. 3.19 AI only knew how to actively pursue one VC strategically.
People think V's AI is bad, but that's because this game has more war tactical control to it...IV's AI was worse but simply brute-forced you with overwhelming stacks...at least until you abused collateral (especially the ultimate, deity SoD crushing nuke). Outcomes were heavily luck-based on a lot of scripts. Some scripts were unwinnable on deity standard settings + huge maps unless you cooked the game or went for AP wins.
You can make a case for features in either game, but ultimately each has had serious bugs and as you go up in difficulty, a strategy-funnel. Right now, the strategy funnel is a bit worse in civ V, but not too much (immortal and especially deity IV forced you into pretty specific looks sometimes, too).
I voted V but very narrow. It needs so much work, but unlike IV it still has hope.