In "Inquisition," Sloan claims that Section 31 was "part of the original Starfleet Charter." He makes no reference to it being part of the current Federation Starfleet Charter.
In ENT, we hear that Article 14, Section 31 of the United Earth Starfleet Charter establishes that certain rules can be "bent" during times of extraordinary crisis. Nothing about Article 14, Section 31, of the UESF Charter is said to establish a permanent organization with carte blanche
to violate all law. Nor is there any indication that the United Earth Starfleet Charter is still in force in the era of the Federation Starfleet.
Further, "Inquisition" makes it clear that Section 31 does not answer to anyone in the Federation government. This is backed up by "Extreme Measures," which establishes that Section 31 even spied on the Federation President himself.
So it's obvious that Section 31 is not a government agency. It doesn't answer to the government in any way. Nor is it authorized by the UESF Charter, even if its members like to pretend it is.
Section 31 is just an organized crime syndicate within the government and military, that's all. It's the equivalent of the Deep State
in Turkey or of Mafia agents in the police, not the CIA or FBI.
Regarding the charters: As I said earlier, we don't know that aspect of the charter did not make it into the federation charter. Again, a ton of other aspects of Earth Starfleet were maintained by Federation Starfleet.
Re: Spying on the President: This doesn't prove official status one way or another. For all we know, Section 31 isn't under Presidential oversight. In the American government, the Congressional Budget Office is a fully sanctioned government office staffed with civil servants who do not answer the Executive Branch.
I maintain that we've never seen an definitive proof, in live action Trek, that Section 31 is or is not a part of the government. Judging by the response that Sisko got from Starfleet Command, where they could neither confirm nor deny its existence, there's a lot of ambiguity. Additionally, if it were just another criminal enterprise, why wouldn't Starfleet (Starfleet as a whole, not just our main cast on DS9) or Federation Security try to take them down, as they did with the Maquis?