Leo XIII rooted his condemnation of Freemasonry on two things:
1). The staunch opposition of the Catholic Church of his day to the ideas of the Enlightenment and of Classical Liberalism. Philosophically, Pope Leo (and his successors until Vatican II) were wed to sociopolitical ideas rooted in monarchy, aristocracy, and pre-modern social order.
This has changed in our generation. The documents of Vatican II, and the Popes since at least that time, have come to a greater rapprochement between Catholic Dogma and modern democratic systems. It is no longer a sin to believe, openly, in a democratic republic.
2). The Pope was jaundiced against all things Masonic not only by the excesses of Continental (Grand Orient) Freemasonry, particularly the French Revolution; but also other anticlerical movements heavily influenced by known Freemasons who were simultaneously virulently hostile to hierarchical and dogmatic Christian churches, particularly the Roman Catholic church. Leo XIII would have been most familiar with Masonic inspired movements which were highly political, and which were wresting influence (and property) away from the RCC.
Leo would have been less aware, IMHO, of mainstream, English-speaking Freemasonry, which has always been noticeably less politicized.
Moreover, until the pist-WWII era, particularly following the aforementioned Council of VII, the Catholic Church was opposed to and condemned the sort of ecumenism which is central to Freemasonry. Since VII, of course, the RCC has been a leader in the ecumenical movement.
So I think there is considerable wiggle room for the RCC to move towards a friendlier embrace of Freemasonry. As with relations with the Eastern Orthodox Church, there remain things to work out. And Catholicism is the absolute paragon of "deliberate speed": change comes very gradually to Her.
But, yes, there is hope. IMHO.