Honestly, Gregory had it coming. He not only tried to kill Maggie, but ge also tried to get someone else to kill her, AND he was going behind the back of the alliance to deliver Negan information during the war.
He was opportunistic, power hungry, and a chickenshit. Maggie called him exactly that for exactly the right reasons.
He should have been killed during the war. He was given way too many chances.
I love the actor who played him... great in a lot of roles over the decades. But I hated the character... he had no redeeming qualities whatsoever.