I know a little about programming and scripting, and here’s a basic idea that I think could work.
Each item has a specific ID number pertaining to it, and it only. The ID could be 8 bytes long with the leading bits representing the objects type (IE: A sword) and the reamining bits representing the specific object. Each NPC has a personal queue of ‘stolen’ items known to it. the queue is limited in size so as the NPCs don’t have unlimited remembering power. Only the original victim of theivery can report the stolen item to guards, or to other NPCs. If he is robbed, his first instinct is to break his day-to-day routine and tell the guards what was stolen, and who, if anybody, took it. Than, for each NPC he interacts with, they preform a digital ‘handshake’, which should share extensive information, including the theivery rumor. However, each time the stolen item ID is passed along, it loses a bit (for fairness, you could modify this so that it’s every two or three times, because it’d degrade fast if it loses a bit each time it’s passed) this represents ‘rumor degridation’. it will stop degrading once only the leading bits are left, so that eventually the majority of the town would know there’s some kind of stolen sword, but they don’t know which one it is. So, if the NPC often meets with shop keepers, he might be able to tell them about the sword in detail. In which case they might call you out. The more stolen bits the shopkeeper has and the more of them that match up with the item that you’re trying to sell, the more suspicious they’ll be of you. Perhaps, depending on your relationship with the NPC salesman that can modify their hostility towards you more, or less.
So, for example (6 bytes for simplicity), if you steal a sword[SW2048] from a fisherman, and he sees you[ID1], he’ll go tell the guards that [ID1] stole my [SW2048]. If the guards see you, they’ll search you, and prosecute you for having [SW2048] if you have it on you. Now, fisherman tells his friend blacksmith that [SW2048] was stolen. He remembers that its [SW2048], and shares it with carpenter, who he tells it’s [SW204], who shares it with preist who carpenter tells it’s [SW20]. Now, you go to the preist holding [SW2048], and he asks you where you got it. This could engage a conversation where the preist could try to trick you, and the wrong choices would convince him you’re the Theif. Than, he’d call the guards who know that [ID1] stole [SW2048] which you have, and they would then arrest you.
My idea is kind-of a scripted solution, and would probably be hard to implement without bogging down the game a lot. But I think it’s possible.