Oda is doing a lot of exposition (foreshadowing is a type of exposition) since the battle with Moria.
Moria said that Luffy was going to lose his nakamas and it happened when Kuma dispersed all them, this type of exposition is named planting and is nothing more than a prediction made by a character or an element in a chapter that triggers a future event. Well, Ivankov said one thing in the last chapter that is for me a trigger for a future event.
Luffy will "die" against Magellan, this is needed for his evolution as a character but this time his dying won´t be alone like the first time, it will be in front of the Newkamas, he will see how all the people that is with him will start to be killed by Magellan and then Luffy will "resurrect" full of his Haki.
About Magellan ans his defeat he have seen a lot of planting since Shabondy:
-Rayleigh able to block Kizaru attack against Zoro, remember that isn´t the same block than nulify.
-Margaret showing to Luffy how when you apply Haki to an attack it becomes stronger.
-Ivankov using Haki against Magellan and making Magellan bleed.