Interesting question. I don't hoenstly know of any federal law that specficially speaks to the use of lethal traps. I don't really see why that would be a federal crime, but rather a legal matter left to the states. State by state it varies. In some cases it is specific, and some a function of case law interpreting the standard use-of-force laws.
I'm not sure they've EVER been exactly legal. Just as we often discuss the question of the right to securing your property doesn't usually mean that you may use lethal force expressly to protect it (except in Texas, at night
) employing lethal force that is directed "to whom it may concern" cannot meet the required standards of justification. You aren't (generally) protecting a life. You are not making the decision to shoot based on your preception of the immediate necessity of doing so -- because you aren't making the decision to shoot at all!
So take it back to 1630, and picture James the Massachusetts Bay Colonist propping up a matchlock fowling piece so it would fire if anyone opens the door to his thatched roofed cottage in Plimoth Plantation... if his neighbor opens the door to see if his pal James is home and gets his head blown off, James will be tried for (whatever their term for manslaughter was).
The boobie trap probably isn't expressly illegal, itself, in that case, but the shooting simply cannot meet the standards for "self-defense" or other lawful homicide, so the crime is the same.
Of course, that's a slightly different point than saying you can be arrested for simply creating or setting such a trap, absent any actual harm done. I'd be curious myself to know more about those laws.