Big Mom and Kaidou aren't being killed by the magma. Magma is just liquid rock. Seastone is rock and my theory is the magma below Wano is actually liquid Seastone rock.
They're actually fusing with the Seastone. Once the fusion is completed they'll be able to completely nullify Luffy, Law and Kid's devil fruit awakening abilities. This will result in only devil fruitless characters being able to stop them. Usopp, Sanji, Jinbe, Nami, Franky, Denjiro, Kawamatsu, Inurashi, Nekomamushi, Kikunojo, Hyogoro, Kozuki Sukiyaki, Sulong Bepo, Killer and the other Minks are the only characters who can stop them at that point.
Luffy, Kid and Law will fight Green Bull. While the rest get destroyed by the two Super Awakened Yonko.