They jam the acorn in hard enough that you have to break the acorn to get it out. If they put it in too small a hole, though, it breaks and rots. Too big a hole and they get taken.
EDIT: clearly didn’t read closely enough. PBS says that woodpecker families run security on their stashes. So they basically just attack anybody who tries stealing. So I guess the ID tech is ‘eyes’.
Woops, you right. Didn’t read carefully enough. I’ll add the answer in an edit.