City Raze

after x amount of failed uprisings (in a row)
I would say about 10 in a row should allow a new button to appear stating "City Raze"

and/or

after x amount of failed attack attempts
Hard to say with this one, people who spam may either think they're spamming off traps (which hurts them, lol) or they just want to make you angry, lol. If you're getting 500 spam attacks a day, I would spam them back. Colonize and release if gates are closed, otherwise spam off their calv.