We don't need to shed Greenway's salary. It might be convenient to, and if we don't like the player anymore it's probably the best choice, but we can take a player back if the salaries match and the player is worth it.
Looking at the path of the least amount of change next year, losing Dumba as the baseline, it basically comes down to Greenway vs. Gaudreau. If we match Greenway's salary, we can't keep Gaudreau. If we want to keep Gaudreau, we need to shed Greenway's salary. The takeaway being, we need to shed salary, but it doesn't necessarily need to be Greenway's.
That said, the Greenway+Hartman for Labanc deal above would put us in the position of dumping Greenway AND Gaudreau, and then calling up a league minimum forward from Iowa or signing one in free agency to replace Hartman, and then still needing to do one more swap of a 2M+ player for a league minimum player, in order to keep a 13th forward on the roster.
So yeah, it is technically possible for us to do salary out salary in with Greenway if the player is worth it, but it would require additional moves, including multiple swaps that may weaken the product even further.
EDIT: What could work for the Wild is Greenway for Labanc@3M. That would still come down to choosing Labanc over Gaudreau, but the domino effect would stop there. We'd just need to sign a 13th forward as we'll need to do anyway. But does Labanc@3M for Greenway work for San Jose? Probably not. And Labanc isn't worth adding any good future assets to get, which is what SJ would probably ask for.