I saw a Marine F-4 magnesium wheel fire once. The fire crew put it out fast (with foam), but the F-4 was heavily damaged.
Yeah, foam would work with a wheel.
But the aluminum superstructure of a small-boy combatant ship can’t be immersed in foam. So there’s that.