There are three necessary assumptions here:
(1) It is possible to build a physical mechanism that neither one of them can break.
If this were not the case, the only way trades could be made is by one person directly giving an item to the other. However, just giving items back and forth doesn't work: as soon as there's an imbalance in the wealth gained, the person with more can grab everything and run away. So there must be someone or something else involved: under the condition that no other person is involved, this assumption is necessary.
(2) All items in this deal are verifiable visually to not be fakes, without physically touching them.
If this were not the case, during the necessary physical inspection, one of them could run off with the item being inspected. So this assumption is also necessary.
(3) Neither one of them can coerce the other into giving up an object if they do not want to give up that object.
If this were not the case, either one could just extort the other, without having to give up anything in return. So this assumption is once again necessary.
Under these three assumptions, there is a mechanism that allows for perfect security in trades. The mechanism should be built into a large wall, so that the two people taking part in the trade are separated. It consists of:
- Two compartments with trapdoors under them, the contents of which are visible to both participants. Each compartment has an opening to one side, and is tall enough so that items cannot be directly taken out of it from that opening.
- A chute under each trapdoor leading to the same side the hole on the top is. This chute's bottom can also open like a trapdoor.
- A second chute, under each of the first chutes, this time leading to the opposite side.
- A "drop" lever on each side. If this lever is pulled, the first trap doors open, and all items in both compartments go back to the sides they came from.
- An "accept" lever on each side. If both accept levers are being pulled, the chutes' bottoms open.
Both people involved can visually inspect the items being traded. If either one is unsatisfied, they pull the "drop" lever, and both sets of items are returned to their original owners. If both are satisfied, they both pull their "accept" levers, and then one pulls the "drop" lever, and the trade occurs.
This device is not just theoretical, though: it has been implemented to solve exactly this problem... in Minecraft. YouTuber SethBling made a trading system that solves this problem with a mechanism similar to the one I describe here.