You fail to understand the post-WW2, Cold War era optimism of Star Trek (something others have given up, but which was the thinking for the people of the era). That thinking essentially being this:
Slavery was with humanity from the beginning, and we came to understand it as wrong, we morally declared it wrong, and we made it illegal. If we can overcome that, we can overcome all our other evils like greed and violence and racism and bigotry, and we are constantly evolving to social perfection and evolving closer to utopia with the end product being utopia. So in centuries to come things will continue to be more and more utopian.
It actually is a bit like the Borg in narrative. Closer and closer to perfection, always evolving towards perfection. Except man's perfection is not malicious in the way of what is essentially a rape on the part of the Borg towards individuals and species with their assimilation process; forcing the will of a mass and their idea on a people, and forcibly stealing people from their own self determination and very soul in what is a cruel torture of making someone themselves but not themselves. Or, you can make Federation utopianism malicious by saying the Cold War era thought had those same properties: coming out of WW2 and going through the first half of the Cold War, government was big and intrusive (to some opinions at least) and did things like pay farmers to plant certain crops and banned them from planting certain crops (to avoid flooding the market too much with a commodity; fear of economic depression for want of regulation was high), and socially during that era people kept there heads down and didn't make too much of a ruckus because they didn't want to rock any boats and they wanted their utopia with a house in suburbia with a white picket fence, a wife who cleaned and cooked and knew her place, and 2.5 kids with crew cuts for Billy and a nice dress for Susie, and Billy would go join the army or work in a factory or office like his dad, and Susie would know her place as a good wife when she grew up, and things would go great forever with better living through chemistry. And woe to whoever made a ruckus during that time, like the blacks asking for Civil Rights or the Beatniks, because to those people wanting their utopia, how dare these people cause havoc to our perfection? And so they disliked those people, to varying degrees from calling them lazy good for nothings to beating them up or beating them to death, and that just got worse as then women wanted equality, and there was a war effort in Southeast Asia these longhairs were protesting and they were being unpatriotic for protesting, and so on. Mind you, I'm speaking not of personal opinion but in the voice of how these people thought. Persecution of anything different was big. And these are people who later voted for Nixon (not the whole of the voters, but the "I want my 50s back" segment was big). So for those reasons, you could take the view of Federation utopianism as malicious because it is based on that post-WW2, Cold war utopian and because in that thought process, deviation from what is declared the norm, deviation being free will, is persecuted and not ideally allowed and everyone lives in houses made out of ticky tacky and all look just the same and go to college and they all come out the same and get married and the marriages are all just the same
. You could also take the view that that version of utopian optimism is a naive and malicious one and that the type of Cold War era optimism that went into Star Trek was not that version at all, and welcomed differences and promoted them. You could alternately take the view that all utopianism demands lack of difference and lack of free will and conformity, and utopia is inherently malicious. This is a fruitful area for debate.