Seems that SFC main focus was always the patrol and protection of it's borders, exploration and expansion.
Yet every episode that shows our heroes patrolling the borders also shows them miserably failing. Either the enemy gets through for long enough to do local damage, or then slips through completely unnoticed and is only encountered deep within UFP space. Sooner or later, Starfleet should realize it doesn't have enough ships and outposts to actually guard the borders, and thus should concentrate on point defenses around locations worth protecting, such as Earth.
There is no clear on-screen evidence of what defenses Earth has, other than the Mars Defense Perimeter.
...And even the Mars Defense Perimeter may be there to protect, well, Mars.
After all, the only time we see this system in operation, planet Mars is also within the frame of the shot. That's
really local defense in spatial terms.
Earth is almost always shown as very lightly defended.
...By starships. But it seems starships are no good at defending star systems anyway. In basically all the cases you listed, it was a plot point that the enemy was sooo big and bad that he could either shrug off or shut down all of Earth's non-starship defenses, in addition to either easily destroying all the starships or then being so fast that no starship (or just one starship) could intercept in time.
It would be like leaving Washington D.C. completely undefended and have to call for the nearest Navy ship to turn around if there's an attack.
...And a whole lot of good a Navy ship would do in defending that inland city...
Of course these were expected to defend Earth against the Federation's traditional rivals, IE: Cardassians, Romulans, etc. Not the Borg.
If they really were big antimatter-laden missiles, as the backstage story goes, then they might not have been intended for use against conventional enemies, either. Looking back at TOS, Starfleet would do wisely to provide Earth with just such antimatter missiles so that whenever a Space Amoeba paid a visit, there'd be an immediate remedy!
What about the big Phaser on mars for destroying Comets that we see in ENT: Terra Prime.
That's a good question. The death ray there wasn't exactly described as a phaser, but rather as a "verteron array", with the intended mission of deflecting rather than destroying comets. Verterons are fictional particles that usually pop up in connection with wormholes and warp imbalances, so perhaps this was some sort of a "wormhole gun" that reshaped spacetime so that comets would be redirected to Mars?
Nevertheless, the verteron thingamabob seemed to easily create a new crater on the Moon, thereby demonstrating greater range than any other beam weapon used by mankind in the show, even though not necessarily particularly great destructive power.
Would that be any good in defending Earth? An unresisting comet might be easily deflected or pitted, but a resisting, powered starship might be immune to that beam. Okay, so Archer feared that his ship might be damaged or destroyed by the beam - but Archer's ship was not properly protected even by 22nd century interstellar standards, and 23rd or 24th century ships might easily be immune to the deflecting effects of the verteron beam.
However, a tiny probe could pack enough verteron punch to disable the warp drive of Picard's ship in "Force of Nature". Perhaps such things could be used for forcing the invaders out of warp? But then again, invaders almost invariably arrive at impulse - even the Borg slowed down long before meeting the first resistance at Jupiter. So the verteron guns might do no good there after all.
Timo Saloniemi