“Was More risking persecution by the Church for writing Utopia?”
Personally, I don’t think so. Although Thomas More was later executed, it was not because of his book, but rather about his loyalty: “God’s first and the king’s second.” There is nothing in Utopia that attacks the Church. More does suggest some reforms, indirectly, for the Church, like more religious freedom, more priestly piety, but he doesn’t attack the Church saying they are wrong, must reform, and so on. Also, More said at the end of the book that he didn’t agree to all the ideas presented by the Traveler in the book.
“In the meanwhile, though it must be confessed that he (Raphael, the traveler) is both a very learned man, and a person who has obtained a great knowledge of the world, I cannot perfectly agree to everything he has related; however, there are many things in the Commonwealth of Utopia that I rather wish, than hope, to see followed in our governments.”
Therefore, I think that More did not risk persecution by the Church.