Its special attack Crush deals heavy physical damage to a character, and it has a chance to counter all damaging attacks with up to two Sandstorms, doing high Wind-elemental damage to the party. On their third turn, Slagworms may attempt to blow out a party member with Snort.
Slagworms are highly susceptible to Death attacks, so Banish and Death spells, as well as the Chainsaw and Air Anchor Tools are the best ways to kill it quickly. Since he won't counter Air Anchor with Sandstorm, it is a guaranteed one-hit kill with no downside. Slagworm is also susceptible to Stop and vulnerable to Ice elemental attacks.
The Paladin's Shield/Thunder Shield will nullify Sandstorm. Snow Scarf, along with an appropriate helmet, will bring Mog's Defense to 255, which will reduce physical damage taken from physical attacks to 0 when Mog is in the back row. Quake will be nullified by the Paladin's Shield or Angel Wings, so there's no need to equip both as long as Mog has 255 Defense.
Use Ice and Water-elemental weaponry to exploit its weaknesses, and the Kagenui to take advantage of Slagworm's vulnerability to Stop. Whether Kagenui is truly useful in this battle depends entirely on the damage done by other available weapons with potentially higher attack power.