Why didn't Canada rebel? Australia? Falkland Islands? Malta? India? Nigeria? Belize? Tunisia? Samoa? Puerto Rico? The Philippines? Guam? Most of the Caribbean? In fact, off the top of my head the only times that you saw a colony rebel in a circumstance like that was the U.S and Haiti. Now you can point pout that most of the countries I mentioned are independent or quasi-independent today but most of them got that status after WW2 when it was actually much much easier to travel. And all of those countries also had the benefit of being able to have a breathable atmosphere, a magnetic field, and land which you can grow crops on none of which Mars or the Moon have which would make them much more dependent on their home nation.
I'd guess that was because there are more factors in play than just distance. But I get the sense that you're trying to invert a logical implication somewhere.
The comparison you should be making is the rebellion of a distant colony versus a more local rebellion. I.e. why did the American Revolution succeed, but the Whiskey Rebellion fail?
You said "You make the government local, or the local government that eventually forms will rebel. Then it will beat you, because it can react to the local situation more quickly.
You might be able to control the Moon from Earth, but Mars will definitely be self-governing. It's all about the latency." Which sounds like you think distant colonies successfully rebelling is a rule of history that means Mars will inevitably be self-governing. I pointed out that in fact, most colonies did not rebel and only became self-governing in the 1900s it no longer took months or weeks to travel to them.
The Whisky rebellion was essentially an armed tax protest, of the kind that happened fairly often in American history and before independence. Its goal was never to topple the US government or create a separate nation.