If externals are insufficient than it must be possible for a priest to withhold internal consent even while performing all the externals correctly.
Agreed. How about giving us a scenario, or poking some holes in St Thomas' teaching?
Possible scenario: Priest becomes evil. He wants all his parishioners to go to hell. When baptizing, he goes into auto-pilot, performing to the motions purely by habit, all the while intending for the sacrament to fail, intending, perhaps, when someone is not looking, to pour the water on the floor instead, or to mumble the form incorrectly, but never gets a chance, since the parents are watching eagerly.
The priest had not intended to perform all the external rites, but his intention was foiled. Did he change his intention out of fear of the parents' just anger that would no doubt ensue? Or was it his intention all along to foil the sacrament, but it was never able to be actualized?
Valid baptism?
I am not saying I know for sure how to answer this, and I will read the responses with great interest.