Traps are a bad idea. A lawyer would just need to find this thread. But you can catch them yourself and be all legal. You can use force necessary to restrain them until cops get there too. You can't beat them senseless. But I would consider them armed and dangerous after shooting the pigs just to watch them die. I know a guy that knocked some teeth out when the thief tried to get away. The thief tried to sue but it was tossed out as soon as the judge saw he was hurt when caught steeling and tried to hit the homeowner. But do not get think that is a free pass to hit. I would personally just want them hog tied face down in the dirt until the law got there myself. I would take pictures of them not hurt at all just tied up. Then post them online for the world to see.
