I appreciate that you are trying to make this have some sort of logic to it. But again, if ALL of those factors list above are in your favor, you still get flips. If all of those factors are strongly in your favor, you still get flips. If you overwhelm every single one of those factors by 5:1, you still get flips.
And if anything, in my experience (and many others have posted similarly) having a huge military in a city actually encourages flipping. I've had several flips which took 8+ units out of size 4 or less cities, reloaded, moved them out, and no immediate flip.
However... considering the bass ackwards way the game does random numbers, it is possible that changing the garison used up (or more likely, never got to - ) a "bad" "random" number on quelling resister checks, and the game then did the culture flip test after the resistance quelling check.
Polonius, insulting the people who have experienced really stupid flips by saying "Predictably enough I was pelted with rotten fruit by posters who felt certain that the AI was striking unfair low blows at them", like we were conspiracy nuts or crybabies, adds nothing. If you haven't experienced dumb flips, good for you. I have. Many of us have. We have done everything the guides have said to prevent them, and they don't get prevented. The formula for checking culture flips is quite likely broken or bugged.
Its not exactly a secret that the game shipped witha bunch of broken features. This is likely one of them. I have another that has ruined two games now when the last unit of a civilization is destroyed, completely crashing the game, on every reload. Others have seen the game crashing when trying to make peace. Its not every game, I've crushed many civilizations in various games, and it almost never happens. But it does happen, and it totally wipes the hours you had previously spent playing that game.
Likewise for bad strings of "random" numbers. There are definately places in the pregenerated strings where the game locks up into an all bad or all good series of numbers. Not just killing a single unit, but literally strings of 5 or more units that win every hit or lose every hit, when the odds were plainly against that occurance. Like rolling 15 or 20 1's in a row on a d6. It doesn't happen often, but when it does, it can completely ruin a game.
There is an unfortunate sentiment of "blame the victim, the designers are flawless" common on game fan sites. It can get very absurd, I remember in Anarchy Online, a game where 99% of the players experienced awful bugs, abyssmal framerates, etc, there would be a couple of new posters everyweek that would come on and say they had no problems with the game, it ran perfectly, and all of the "whiners" just had crappy computers/didn't know how to maintain their computers/ didn't know how to play the game/ did read the manual and so on. However, the AO nightmare was so bad that several times a patch would come out that would upset the delicate balance that their computers were in to make the game playable, and then they'd be back *****ing like the rest of us. Some even apologized for insulting everyone else, an utterly amazing event for a web board.
Now, even if the bad flips people rail against here are due to a 1/100 or whatever chance that the game may leave for a flip, no matter what (and I don't think this is the case), you have to ask - is it good gameplay to flip a city randomly without any warning and zero chance of preventing it? Yes, other games have random events that can be quite catastrophic, but... they also happen to the enemy. Many times, there are things you can do to prevent them - like the novas or meteors from MOOII. I've never recieved the gift of a size 15 city with 2 wonders in it in the heart of the enemy empire. I've never recieved a warning that a city was considering leaving. It just happens.
And thats what we want changed. Either a clear set of rules about how flips occur, a warning and a chance to prevent flips, or a fixing of whatever bug allows a size 7 city to flip with 5 military units and a 6:1 ratio of my citizens:captured citizens with 100+ culture generated from rush built temple, library, cathedral and colliseum, 3 spaces away from my forbidden palace, on the other side of the continent from the lone remaining enemy city on an island off the continent, in a WLTKD from all happy citizens, when I have a 3:1 advantage in culture and a 100:1 advantage in power, and living in a republic. Not just once, but 5 times in 3 turns cities with similar circumstances do this.