Tiny caveat:since this entrance will only allow wagons, all other _caravan_ units will need another, normal, walkable path (which can contain traps, but _must_ be pathable for any ground unit, including, say, migrants). And since every caravan will have a bunch of non-wagon merchants - all those leading pack animals - you will need the extra entrance if you want to trade.
If you used this entrance only and had no additional walkable path inside, you could not trade with the caravans, because a caravan won't become available for trade until all its merchants are at the depot and have 'finished unpacking'. You could of course let something funny happen to the wagons and claim the goods that get dropped.
Although, considering a weirdness of pack animal merchant pathing, it might be possible to get the wagoners to trade anyway. It would require an extra outside depot not accessible for wagons, and i've no idea if it'd work: you build the 'outside' depot first, build enough walls or traps around it that wagons won't path to it but make sure it can still be reached on foot. Then you build your regular wagon depot, with the 'wagon filter' entrance. When caravans appear, they should now split - pack animal leaders always path to the oldest unforbidden depot on the site, regardless of access (if the oldest depot cannot be reached on foot, they'll just freeze where they stand), wagons go to a (the) wagon-accessible depot. Now, once all merchants have reached _a_ depot and unpacked, i think it's possible to trade with the merchants at each depot separately. They'll only offer you the wares they brought to the depot you're trading at, obviously. The non-wagon depot would of course remain outside, with easy access for hostiles and building destroyers.