Random thought!
I strongly think that MS Dhoni managed to do what Afridi failed to do, in his career.
There is no doubt that Afridi has a fine hitter and based on that criterion alone, I would put Afridi over Dhoni.
But Dhoni quickly realised the important to sustaining pressure and utilise his role in the lower order. Its almost a sad state of Pakistani cricket than Afridi played for around 15 years at the top level but was never able to cement a role for himself in the batting division, a sad though if you consider the wasted potential.
Whereas, Dhoni was managed a lot better and learned his skill to a tee. Without him, India wouldn’t be sitting so pretty in this age of cricket.