Not exactly true. Intention is a requisite part of a Sacrament. A priest, for example, is taught to focus his intent on elements of the Eucharist. But without that intent, the Eucharist is not confected. A seminary priest, for example, could instruct seminarians on how to say Mass, and demonstrate as a lecture. Even thought the matter, words and actions would all be present, the intent to actually Confect the Sacrament would not be there. The bread and wine used in the training would remain just that, bread and wine.
But the necessary intent required for Baptism is very low. All that is required is that the person simply intent to Baptize.
It does not require an intent, or even a belief that Baptism is even a Sacrament, only that the person know that they are attempted a Baptism, not just wetting the person’s head while saying words.
A well meaning atheist could validly Baptize, or a kind hearted Jew. All that is required is that intent to do what ever it is that Christians call ‘Baptism’
And God handles the rest.