Why not have a variable, "Last Gold", and have a Parallel Process check every 30 frames or so to see if the party's current gold is higher than that (Conditional Branch: Script: $game_party.gold > $game_variables[22])?
If it is higher, play a sound effect and/or show a message, then increase the Merchant's (or Party's) EXP by (current gold minus last gold - you can do this with variables), then set "Last Gold" to the current party gold.
You can even remove the need for a lag-inducing Parallel Process (and increase the precision of the check to Every Frame) by using Hime's
Page Conditions script.
This will grant an accurate amount of EXP when you gain gold by any method (in battle, by selling items, from an event, etc.). As far as requiring a "profit", that's something that you'd have to figure out from a game mechanics standpoint, since in most games you always take a loss when selling items.