You wrote:
“The entire notion of an officially Catholic state is an invention of the 17th century.”
Fourth Century actually. First Armenia (under King Tiridates in 301), then the Roman Empire under Emperor Theodosius the Great in 380.
The government of Rome was held alternately by Catholic, Arian and pagan believers depending on who was able to win the personal allegiance of the armies.
The notion of a confessional state really begins with the Peace of Westphalia - and even then it is inconsistent.