This is what the Judaizer error does. It makes an incorrect application of who God’s people are, based more on ethnicity than on faith, and it bears destructive fruit.
It is also clear that Jesus critiqued the Jewish religious leaders attitudes towards the Samaritans as well. In fact he has the definitive critique. He uses the example of a hypothetical “Good Samaritan” to challenge the Jews of his day about the proper way of loving our neighbour (Luke 10:25-37). And he deliberately places himself in a situation to both minister to and through a Samaritan woman in John 4. What I mean by ministering through her is that she goes and tells many Samaritans about this amazing man she encountered and then brings them back to him to receive salvation. And of course he tells the Apostles in the Lukan Great Commision in Acts that the gospel is to be proclaimed in Samaria as a priority, after extending their ministry outside of Judah, “8 But you will receive power when the Holy Spirit has come upon you, and you will be my witnesses in Jerusalem and in all Judea and Samaria, and to the end of the earth” (Acts 1:8). Jesus was not anti-Samaritan, like his own people often were.
I think it is entirely valid to see this New Testament commentary on the place of the Samaritans as a critique not just on how Jews viewed Samaritans in Jesus’ day, but also as a critique on how this conflict between these two people claiming descent from Abraham and faith in the same God began. Jesus was critiquing the Judaizing error before Paul even understood the gospel. But the Old Testament was critiquing it even earlier, because it is the living word of God which Jesus fulfills and shows us how to understand and apply properly.
An incorrect ethnocentric application of the gospel or faith in God is destructive. It led to a centuries long conflict between the Jewish people and the Samaritans, and it is today leading to a now century or so long conflict between the Jewish people and Palestinians. In fact, some of the similarities are actually remarkable between these two situations.
As Christians we need to resist any genetically based claims to the promises of God. This Judaizer error is persistent and comes about in many forms. But consistently the Bible rejects it and shows the damage that it causes. That Jesus made a point of affirming the Samaritans, a people the Jewish nation almost universally looked down upon, should give us a powerful insight into how God sees this error and why we should reject it.