There was a lot more to it than that. Mormonism was, in its origins, very similar to Islam and was meant to be a theocratic system (where the civic society was ruled by religious law and the clergy). The Mormons were very aggressive and sowed fear everywhere they went, attacking wagon trains passing through “their” territory and essentially trying to set up a separate society. One feature of this was polygamy, but the real reason that Mormonism had to be defeated by the US is that it was an unconstitutional rival political system and it was attempting to spread itself through aggression.
Islam is exactly the same, and I think we would be fully justified in attacking it and driving it out. Mormonism was a new “religion” in the 19th century US and didn’t have a large number of followers, so it was fairly easy to get those who wished to remain part of the US to abandon violence, conquest and any of the features that conflicted with US law (such as polygamy). I don’t think Islam, which has been around a lot longer and has a lot more money and power behind it, will be willing to adapt, which therefore means that the only solution is that it must be forced out of this country and never allowed to get a toehold here again.