Don't settle too close to existing settlements.
Trap lines are detected by humans, so they can bypass those. Trap "mine fields" might work, but note that they'll get friendlies too (I've gotten one foreign trader (killed) and one stupid character who first cut down trees in my trap line, and then proceeded with stepping into one of the traps he could no longer see because the trees formed part of the line. It took him several months to recover, all the while claiming everything was fine).
Robbers and Njerps will get in and take your stuff if they get close enough, unless you're on a small island, but once they've loaded themselves up they get slowed down by all that encumbrance...
I don't think friendlies have ever stolen anything from me, so if you refrain from settling on their territory (i.e. within 3 or so tiles of settlements: the rest of the cultural areas is fine), you shouldn't have any trouble.
I've seen reports of friendlies stealing kills from traps, but that ought to be chalked down do artificial stupidity.