You absolutely 100% of the time make the trade if the star is locked up long term (and still in his prime). You don't give it a second thought and you never look back. Role players are easy to replace. And it isn't like you wouild just get 1 player back, you would get players back from the team you are trading with because they have to free up the roster spots.
Let's just say it is Cousins.
So Boston trades Amir, Sully, Thomas, Smart, Crowder, Bradley (that's about 40 million in salary)
In order to trade for Cousins and his 16 million, others would have to come back. And not just the 5 least paid players because that isn't enough salary. You would have to start with Bellinelli, Casspi, and Butler and may even need to include someone like Rondo just to get the dollars there.
Even if the star had a bigger contract like Carmelo you would still need to add another 10 million or so in salaries, so real actual players would have to come back.