Intention has nothing to do with it. The rite is either valid, because the proper form is used, or invalid because the proper form is not used. God has all the power, and will confer grace based on form, not intent…though in a regular baptism, the intent of the parents and godparents is asked for.
I guess, if the proper form is used, it implys the intent is there, or why go through the motion?
anyway, that is what I was taught while I was a Catholic. We were taught, in grade school how to baptize in case of an emergency. And taught that we should only do so if we were sure the person was going to die, because if we baptized them, we were accountable to see that they received instruction in the faith…were they to live.
which brings me to this interesting story of which I just became aware.
I am a pantheist, and my children are not baptized. My Catholic brother was trying to round up some members of my family or origin to come to our home…750 miles away and baptize my kids (18, 16 and 13 at the time) against mine and their will.
Fortunately, none of them were interested in his crusade, and he, being blind and rather small, was unable to chase down, my sons, who are over six feet tall and confer the sacrament upon them himself.
When they were babies, he was not quite so Catholic, and thus uninclined to make such efforts on their behalf. I am not sure if he understands that were he to baptize them, it is up to him to see that they receive the proper instruction. That would be difficult from so far a distance.
If my children ever choose baptism, I will be there, supporting and celebrating their choice with them. But as a former Catholic, now pantheist, I did not choose to have them baptized.