I'd say the worst was A Taste of Armageddon. The Enterprise was warned not to enter an independent system. They went in anyway with the intention of setting up a treaty port.* When they became involved in the war Kirk threatened to kill everyone on the planet and then later totally overthrew a system that, to us, was barbaric but worked for the tow planets involved. It may not have been a war that the Federation would have fought but in a very odd way it lept the peace. Cities were not bombed. Disease was not rampant. Economies were not destroyed. Just showing up escalated the war. Way to go Federation.
*A treaty port is a port that is established in a country at the barrel of a gun. From Wikipedia:
The first treaty ports in China were British and were established at the conclusion of the First Opium War by the Treaty of Nanking in 1842. As well as ceding the island of Hong Kong to the United Kingdom in perpetuity, the treaty also established five treaty ports at Shanghai, Canton, Ningpo, Fuchow, and Amoy. French and American concessions followed soon afterwards.
“Unequal treaty” is a term used in specific reference to a number of treaties imposed by Western powers, during the 19th and early 20th centuries, on Qing Dynasty China and late Tokugawa Japan. The term is also applied to treaties imposed during the same time frame on late Joseon Dynasty Korea by the post-Meiji Restoration Empire of Japan.
The treaties were often signed by these Asian states after suffering military defeat in various skirmishes or wars with the foreign powers or when there was a threat of military action by those powers
Not really the sort of thing that you would imagine the "enlightened" Federation would do but there it is.