We do well to acknowledge failings, otherwise we do not correct them or understand where opposition arises. But your statement that the church only opposes freemasonry out of embarrassment of its own history is asserting a sinister motivation to the church’s actions.
I further wonder whether you are confusing the Knights Templar with Freemasons when you imply that the church has done things she’d rather no-one remember.
The very existence of the Masons reminded Rome of a big black mark on our history.
The Templars were treated horribly, and a full apology, by the Vatican, will probably happen some day.