I agree with what you said. The value added from the new player over the replaced player is the important part.
If adding a WR increases offensive output by x points over what Robinson brings. Versus the y points given up decreased by a new edge rusher over Hoecht.
In my opinion, I'd go with whichever x or y is greater.
One other factor is how easy or hard it is to find new players better than the current. I'd say Wr is harder than edge given our current roster.
I also think pass rush can be manufactured by coaching more than receiving big plays. The value of a Puka taking a short pass eighty yards is immense. Much higher than a good but not elite edge imo.