How do anticholinesterase pesticides kill nematodes?
Cholinesterase inhibitors and plant-pathogenic nematodes
While it is true that cholinesterase inhibition does not affect gas exchange in nematodes, it does produce other effects by paralysing motor activity:

Inhibition of larval hatching

Reduced movement to new roots

Impairment of root invasion and feeding

Impairment of copulation


Acetylcholine also has a role in sensory neurotransmission in nematodes, which could further contribute to the toxic effects.
Thus cholinesterase inhibitors do not directly kill nematodes, but only slow down their growth and reproduction. This is why some prefer to use the term 'nematostatic' over 'nematicidal' for these compounds.
Effects on vertebrate pathogens
Pyrantel is a cholinesterase inhibitor used to treat intestinal nematode infections in man and other mammals. Little is known about how exactly it works, except that it causes spastic paralysis of the worms. Possibly, it impairs feeding and reproduction (like its counterparts in plant pathogenic nematodes).

References and further reading:

Wright DJ. Nematicides: modes of action and new approaches to chemical control. In Zuckerman BM, Rohde RA, editors. Plant parasitic nematodes. Vol. 3. New York: Academic Press; 1981. p. 421-449. Link to publisher site.
Martin RJ, Robertson AP. Mode of action of levamisole and pyrantel, anthelmintic resistance, E153 and Q57. Parasitology. 2007 Aug 1;134(8):1093–1104. https://doi.org/10.1017/S0031182007000029