He denied having a demon (obviously) but said nothing about being a Samaritan. Eli Lizorkin-Eyzenberg thinks that this may be support for the idea that the Book of John was intended to be crafted in such a way as to be 'friendly' to the Samaritans by avoiding certain controversial points of doctrine. (The Jewish Gospel of John, page 131 (ISBN: 9781514392836))
The charge that Jesus had a demon appears to me to be a desperate attempt to smear Jesus' character in a way that would be difficult to refute. Jesus does not let it bother Him. He continues to press the limits. If anything, He becomes even bolder in His claims. In verse 51, he states: "whoever obeys my word will never see death." This forces them into a corner. He is either God or a crazy person.