That is patently false. The Church long ago refuted the heresy of Donatism. Apparently it is another heresy held by some Protestants.
Peace be with you.
In the Summa St. Thomas affirms: The ministers intention is required, whereby he subjects himself to the principal agent; that is, it is necessary that he intend to do that which Christ and the Church do. (Part III, q 64, a 8).
Theologian Ludwig Ott gives this argument against the validity of intention mere externa, calling it insufficient:
According to the almost general opinion of current theologians, an inner intention (intentio interna) is necessary for the valid administration of the sacraments. By intentio interna is meant an intention that is directed not merely to the external execution of the sacramental rite, but also to its inner signification. The mere external intention (intentio mere externa)
which is directed toward merely performing the external action with earnestness and in the proper circumstances, while the inner religious significance is not taken into consideration, is insufficient.