Colonialism was about imposing religion, language, government and society on a people who didn't want it
I mean, yes and no? Colonialism was about extracting wealth, and everything else flowed from that -- up to and including imposing religion, language, government, etc., on colonized peoples. The colonial powers were willing to use force to achieve those goals, but the use of force was not the a priori motivation. They would have been perfectly happy if they had just sent in their ships and the locals had just done what the colonial powers wanted willingly, and indeed fantasies of colonialism from those powers often imagine colonized peoples who willingly accept their colonial status. Those fantasies, of course, are not true -- they are examples of pro-colonialist propaganda, by virtue of the fact that they imagine a consent that does not exist.
And that's why I say Star Trek is a fantasy of benevolent colonialism. Star Trek depicts a version of colonialism that is, in-universe, happening by mutual consent, in the same way that colonial powers often wanted to imagine their colonized peoples consented to their domination by colonizers.
using force and not the same as a treaty willingly agreed to which is what the UFP do and comparing them to the horrors of colonial empires is an insult to the victims of colonialism.
No. If anything it is a criticism of Star Trek, as one could argue that if Star Trek embraces fantasies of benevolent colonialism that necessarily means Star Trek is dishonest in its portrayal of colonialism and is therefore a piece of pro-colonial propaganda.
Edited to add:
To be clear: Recognizing when modern literature or art uses tropes that have their origins in deeply oppressive systems in real history, even when those tropes whitewashed the horrors of those oppressive real-world systems out of the work of art, is not an insult to the victims of those horrors. It is, rather, an important way of recognizing when those tropes lest they come back and end up used to justify new incarnations of those old systems.
It is perfectly fair, for instance, to note that characters like Mickey Mouse and Goofy have their archetypal origins in American minstrel shows -- shows that were themselves forms of comedic white supremacist, pro-slavery propaganda. To note this is not to insult the victims of slavery; it is to note that tropes can form out of a genre of fiction that had been used to justify an oppressive system and then be used in new ways that avoid acknowledging the context of their original creation.
So it is with Star Trek. It was literally described by Roddenberry as Wagon Train to the Stars. That does not mean Star Trek is pro-genocide of Indians, any more than Goofy cartoons are pro-slavery. But just as Goofy draws upon minstrel show archetypes, Star Trek draws upon the colonialist process that was the settling by white people of the American West (and upon works like Horatio Hornblower in its depiction of Starfleet as a space navy that establishes and protects colonies from irrational alien aggression [and funny how aliens like the Klingons were designed to look like Anglo-American stereotypes of Asian people], same way Horatio Hornblower depicts the Royal Navy).
Again, recognizing a trope's origin and the ways in which the trope has been whitewashed of the real-world context is not the same thing as belittling the horrors of those real-world contexts.
Last edited: