TL;DR
No, making a country that spans multiple planets is not a good idea.
While it is feasible(ish), it's certainly not very useful. Let's imagine a rudimentary system for the space of this answer. It consists of four worlds:
* Earth
* The Moon
* Mars
* <PERSON> (orbiting a star 500 light years away)
Ok, so now let's try using a US style government:
Each planet is divided into 200(ish) 'states', which are equivalent to US states in function, but are much larger, approximately equal to countries on Earth. Further, each 'state' is divided into 'substates' which are the size of US states. Ergo, the organization chain-of-command might look something like:
1. Federation of Planets
2. Planet
3. State
4. Substate
5. County
6. 801
Town
We'll assume that the Federation has a constitution similar to that of the US, and that laws work, like in the US in a top down jurisdiction (Ex. a law at the planet level holds across its planet) and a bottom-up importance (Ex. the Federation outlaws wearing tall hats, but <PERSON> specifically permits it, so residents of the planet Bob are allowed to wear tall hats.)
Great! You have a functional country.
And then election time comes along. Since, for important plot reasons, the main government is situated in Oklahoma City, the president of the Federation has to live in the Octarine House. Now you have a conundrum. If we assume for a moment that a <PERSON>, a ungendered person who lives on planet Bob, is elected by majority, then they need to travel to Earth to live in the Octarine House. Unfortunately, that leaves the Federation without a president for the next five hundred years while <PERSON> uses relativistic travel to get to Earth.
If <PERSON> isn't a source of candidates, then there's a big spat over government without proper representation, and that story has already been told.
But let's assume it happened anyways. In the above link, the parent government tried to put down the rebellion and it failed.
Earth can't even do that. For the same reason that <PERSON> can't elect a president who lives there, Earth can't really attack <PERSON>. Bob is, essentially, under its own rule. 943