We are talking in TNG section, so throw Kirk out from this discussion.
The bold one: So you admit that Starfleet is more than Military. If Starfleet is a military, Their scope of missions will only limited to military one; according to UFP military doctrine. They won't be in charge of Section 31, diplomacy, archeology, researching, etc. Those missions will be handled by different government entity inside UFP. But it's not. Starfleet do more than what military do. Yes, they're a militaristic organization. But they're not just simple military like the Army, the Navy, the Marine, or the Air Force.
What Starfleet do is already the same as the government themselves. They're like the government inside a government. Maybe when UFP central government rule over planets, Starfleet fule over the space.Thus I compare them with VOC and Shogun.