Last time I checked (maybe on Minecraft Java 1.21.1), you could have Villagers and Wandering Traders with trades that wouldn’t give any experience orb reward. Currently this is no longer possible.
This was achieved by having the xp field of the i’th trade (Offers.Recipes[i].xp) set to 0, or having the field removed/not present (field not present should work as default value 0). Just in case want to mention that Villagers do naturally spawn with some of their basic/initial trades with no xp field (this is not only for commands).
Now, even having xp set to 0 or with the field removed, the trade always spawns experience orb.
If this gets fixed, I would like to suggest adding a new boolean field in the trade nbt, to be able to toggle on/off experience reward without losing its original experience reward amount (not having to set it to 0).
Ah sorry, I just found out the existance of the rewardExp field (exactly what I was asking for haha). Its default value being True means it doesn’t show up on natural spawned villagers.