His failure was that at the end of the day his revival hadn't come from his plans but from Kabuto. In case you talk abou the curse mark, I should tell in advance that it was only disallowing Obito from commiting suicide or become a jin, nothing more. A true master does not come back at the game by mere luck. Also, when obito was jin he could have demolished him but chose not to because he was keeping, I guess, Hashirama at bay. Being said all that, he stood lucky at some circmustances while Obito had planned many things up ahead in case things weren't going according to his plans.