Truth be told, this is (at least for me) still one of the major issues with trade and the BGS[1]. The amount of profit the commander makes should be irrelevant to the effect of the transaction for the faction; they still regardless of if the commander makes or loses, say 2000cr on the item, the station still buys it for, say, 10,000cr.
At the very least, selling to High/Medium/Low demand should respectively increase the influence/economy, while selling to no demand (i.e it's not actually an import item) or beyond demand (i.e it's an import item, but you have more items than there is demand) should hurt influence/economy. Coincidentally, this would've also helped correct the lack of negative states prior-to Drought/Infrasturcure/Terror/Blight states being added, and also corrects for massive saturation (e.g in the case of LTDs), and promotes diversity of goods (for low pop systems).
So then regardless of the washed price of a good, if it's selling to a demand line, it'll still make a positive effect.
[1] such is the case for bounties/CZs as well; the effect should not be contingent on you handing the bonds or bounties in, rather, it should be an effect of the kill.