Yes, you’re right. Good comparison.
He already knew she was a sharp cookie, from her first question, and later statements. I think he was provoking her, to see what she would say. And of course making a powerful statement about Jews vis-a-vis Gentiles.
Like Trump’s comments, it brought more attention to his name and his message—in this case, for all time.
There was a great scene, buried in all the gore, in "Passion of the Christ" in which Jesus as a young man was drawing water for Mary and playfully splashed her.