Gallagher's lost his wheels sadly but I don't think he's getting moved in a trade. If not LITRetirement, then like you say: buyout.
A good way to think about a buyout is to think how much would the roster replacement cost for the duration of the buyout penalty? Gallagher's buyout caphit is 1.75, 4.25, 1.75, 1.75 over four years -> if we take the highest hit of 4.25, the difference between his cap hit (6.5) and 4.25 is 2.25m. Can we find a player who can contribute what Gallagher does (over a full season) at 2.25m? I think so.
If you want to be more reasonable to the team then take a mean cap penalty of 3m, and the difference with his cap hit is 3.5m. I think we can definitely find a superior replacement at 3.5m.