This came up a couple weeks ago, and I thought I had a good idea for a simple fix. You should be able to formally request to be removed from an alliance, the same way you apply to join one. If there is no response in 24 or 48 hours (or whatever you want to set it at) you should be released penalty free. However if the host actively declines your request, you have to either stay or take the penalty.

Another idea is you can quit one alliance for free, and the second one (within a certain time) costs you 10 percent, and the third 20 percent and so on. So if someone is alliance hopping it costs them, but they have a recourse to get out of a bad alliance.

Having a player alliance history would help too, so a new alliance could see how often a player jumps ship.