At the current broken (in my opinion) state of Villains there's nothing you can do except block all visitors. Questors aren't a big threat as long as they behave in a (technically) reasonable way, as they're sneaking in from the map edge, and thus meet your defenses. The probably unintended planting of a 5:th column in the form of the attacking quester's buddies makes it worse.
However, the big threat are Villains (and here I call everyone Villains, even if they're just lowly henchmen and couriers). These character flip your dorfs with essentially no resistance (that part is at least partially broken, as it was something that had to be put to the side to finally start with the Premium stuff), and there's absolutely nothing you can do about that except block villain access to your dorfs. The dorfs are then the ones actually performing the thefts, and they then hand the items off to the designated Villain waiting in your tavern/library/temple/guild hall. The Villain then carries the item away off the map.
You're notified about the theft after someone detects that it's gone or somebody is taking the item, but that report may well happen long after the Villain has left the map.
IF you get a report you can then laboriously interrogate suspects (and not so suspect ones), supposedly resulting in discontent if done too much. If you're lucky, you're able to identify some of those involved and get them sentenced, with a horrible UI for interrogation and punishment. As far as I've seen it's more chance than anything else that determines if you're even able to find out what the punishment was. Even in the case where the Villain is imprisoned, however, you're still not able to recover the artifact he's carrying (you can using DFHack), and if one of your dwarven morons is sentenced the idiot makes a beeline for the artifact to steal it again to hand it over at the next opportunity: there doesn't seem to be any deterrence whatsoever.
Note that the above is written by someone who's completely fed up with Villains and the complete absence of means to prevent or stop them (assassination missions might eventually allow you to take out the master Villains behind plots. On the other hand, I had hundreds of claims on each of my locally produced artifacts when I checked Legends Mode info, with one or two new claims trickling in every month.
My current fortress is nearing 50 years, and I've sent every Villain entering the map on a one way teleport trip to the magma sea (using a script), and I seem to actually almost have run out of Villains (on the other hand I've also almost run out of visitors, as most of those not slaughtered by invaders or deadly evil rain have died of old age (leaving the badly bugged performance troupes with their elves and goblins as the bulk of what remains)).