I encounter a wild Pokemon and send out my Pokemon. They both start with items. The wild Pokemon uses knock off and its item gets knocked off. My Pokemon uses trick or switcheroo and steals the wild Pokemon's item. After that, the wild Pokemon faints. Is the outcome different if it was a regular trainer's Pokemon instead of a wild Pokemon? Please don't question my curiosity.
This is actually impossible in recent games, since from Gen V onwards, “wild Pokémon cannot remove held items of the player’s Pokémon,” so naturally, I went to test it in SoulSilver. I went into a wild battle with two Trick users holding different items. I tested against a wild Farfetch’d (which naturally knows Knock Off), tricked it one item, then switched and waited for it to use Knock Off. After getting its item knocked off, using Trick will cause the move to fail.
Knock Off deals damage and if the target has a held item, damage is increased by 50% (i.e. 97.5 base power) and the item is removed for the remainder of the battle (switching out does not restore the item). All items are restored at the end of a battle.
You kept your item. Source