Best method I was told. Build a 2x2 stone [or wood if low] foundation with 2 high walls, drop in with flyer, feed through wall. Has a massive hitbox to feed it through if lured close to a wall. No repel needed with this method.
There is a great video on how to kill death worms very early game on YouTube by a guy named fresonis which involves using oil jars and flaming arrows to kill it and catch it on fire while it moves underground. This strategy is great for early game players with limited resources as it only takes around 4-5 oil jars and flame arrows to kill a level one death worm. This is a great way to farm horns for mantis taming.
A good idea on Ragnarok is to drop one in the desert temple and block the exits with wyverns. The put on ghillie and bug repellent. If it goes aggro run over and get on a wyvern. Tamed 2 level 150s like this. Best way to easily get them. Another thing is avoid taking in open desert because if a death worm shows up you are screwed and so is your mantis. Good luck taming!!!
Trapping them in a building never worked for me. Even when not aggro i could not feed it. If taming in the desert use a flying combat mount. Use bug spray on the mount and yourself so you can land,dismount,feed and fly off clearing nearby dinos until next feed. This stops it aggroing on your mount and helps you avoid chasing it around on foot losing food/water