The effect of detergent, and water on soil bugs is it gives them diarrhea,
and they poop themselves to death.
It's not harmful to earthworms BTW.
I know from experimentation that (a little Neem oil can also be added)
it kills fungus gnats. and they're larva , cutworms, june bug, and japanese beetle grubs.
Soil infested with Mealy bugs, Thrips, etc..
It probably would kill nematodes too.
I've never had that problem in my soil. in over 35 years of gardening
Or maybe I did, and didn't know it, because the detergent,
and water killed the nematodes.
I always treat my soil with detergent and water after planting so water will penetrate the soil better.
and make nutrients more available to the plants roots.
I'm sure if detergent, and water doesn't kill nematodes,
it certainly would sicken them a lot, and slow them down until other methods could be used to kill them.
It certainly would be worth the experiment.