Pretty much this, especially when he encountered honorable pirates beforehand(Whitebeard and Roger). From his perspective, it was actually a good choice.
- They offered him to free every hundred hostages at every dance
And it's not like he did it blindly. He came to check everytime if everyone was alright and had a 5year time limit. From his perspective, the pirates may or may not have been as honorable as Whitebeard/Roger, but even if in case they were lying, he could have at least tried to save as much hostages as he could during those years and ultimately fight them off after the 5years timelimit if they didn't concur to the deal anyway, and ultimately his plan was working until the "killing of Hyogoro's wife" that made him realize they broke the deal and went all in then. Before that:
- They had multiple hostages, and even if he fought right there are now, he wasn't sure to win. They had the upperhand not only because they could kill the hostages at any time, but they could use them to weaken him emotionally as well
Even if he ended up winning the battle, it'd come down to a similar situation to Orochi's. Remember the reason why he ended up being evil? It's because his family was persecuted. Oden may have been strong himself, but his family would have been persecute. The image of the Kozuki clan would have been destroyed, all of that ruining his plan:
- Opening Wano borders, which will play a huge part in the world of one piece with the ancient kingdom, ancient weapons and relational battle against world government, history that Oden likely learned from his travel with Whitebeard and Roger, something he'd not have learned if he stayed in Wano
So ultimately then, i'd say that Oden just made one mistake, which was leaving Wano, because leaving Wano, indirectly allowed the grandma/grandpa/Orochi plot to build up into killing his dad and slowly but surely detroying the country, with kidnappings allowing Orochi/Kaido to gain emotional edge over him, but it's not like he could have known all that would have happened in his absence
On the other hand, as already mentioned before while he did made that mistake, his travel all over the world allowed him to grant a knowledge in the relation between Wano and Ancient Kingdom that he didn't know before, with this leading to something more important than his life, which would be to free the world from the world government, with his purpose in life(open Wano borders) being a trigger to that.
He wanted to live long enough to accomplish that because he believed he could use his infamy as Kozuki to lead as Shogun and manage that, but when he realized it wasn't his time yet, he decided as a last effort for someone else to inherit that will, with the new reincarnation of Joyboy and Momonosuke playing a huge part in it imo, with his legacy being leaving his swords behind to accomplish that