Cardinal Rampolla was vetoed as pope by Emperor Franz Joseph. Red flag no 1.
Cardinal Rampolla was removed from the Curia during St Pius X's pontificate. Red flag no 2.
Cardinal Rampolla was thought to be a freemason or have strong connections, if he wasn't specifically a member. Red flag no 3.
See this thread:https://www.cathinfo.com/the-library/cardinal-rampolla-was-a-freemason-by-the-abbe-francesco-ricossa/
Cardinal Gasparri was a disciple of Rampolla. Red flag no 1.
Cardinal Gasparri made false accuasations against St Pius X regarding the "Sodalitum Pianum" (organization used to identify modernists). Red flag no 2.
I'm sure there's more, but I don't care enough to research.
The bottomline is that St Pius X did as much as any man, any SINGLE man, could do to stop modernism/communism. But often he acted alone. As he famously said:
"De gentibus non est vir mecum" -Among all men that surround me there is no one with me.
Let's not imagine that the decade before Fatima in the early 1900s was some mecca of sanctity in rome. Only a few years earlier, Pope Pius IX was imprisoned and almost killed in the Vatican. And St Pius X warned that as soon as he died, if there was not vigilance, that modernism would return stronger than ever. This happened shortly after he died, as he predicted. Italy has been run by freemasons for over a 150 years. The Vatican is not immune from such evil influences. It's a miracle that St Pius X got elected to begin with.