I usually like your thinking, but I just don't see how you think Luffy needs more time to train to defeat Doflamingo.
I'm not saying that Luffy is at Doflamingo's level right now, but when has Luffy ever matched up against someone that is his equal? Luffy has always fought an uphill battle, and I believe the same goes with Doflamingo
If you look at it closely, it makes sense. Luffy has trained for two whole years. Yes, Doflamingo has been a pirate for a long time, but he might have reached his peak, or else he would still try to conquer or something. Luffy will defeat him, a huge milestone of sorts, then he will defeat a person that is 1st Mate material(SLIGHTLY higher than Doflamingo, think of Marco), which will put him at Admiral level. Then Luffy will have the battle of his life, where he will muster all of his strength, speed and will to defeat the first Yonko, aka Kaido.
Luffy obviously isn't just any pirate. Given that he's the main protagonist, we know what he's gonna do. But pushing that aside, he has always showed tremendous growth during fights, and I believe he's very capable of taking on Doflamingo. Like any other opponent, Doflamingo will probably underestimate him though, until Luffy shows his true strength.
That's just how I see it. I know we have different viewpoints, but I just thought I'd share mine and maybe you would see my reasoning