separation of church and state is the idea that the government can't establish, support, promote any one religion as the official religion. You can make any defense you want in court.
I do not believe in demonic possession. The word in the original Greek is daimonizomai means something closer to "demonized". Possession implies ownership. If I possess something I have it in my possession. It's mine. I don't think "demonized" really means owned. It's something more like being influenced by or bothered by. I do believe that people can be heavily influenced by demons - mostly by their own actions and decisions.
Would I find someone guilty if their defence was "a demon made me do it". No.
Two "possessed" (as translated in older versions of the bible, most modern translations don't choose this word) men living in the tombs runs to meet Jesus when he shows up in a boat. Story is in Matthew 8:28-34,Mark 5:1-20,and Luke 8:26-39.
Mark version:
[5 They went across the lake to the region of the Gerasenes.[a] 2 When Jesus got out of the boat, a man with an impure spirit came from the tombs to meet him. 3 This man lived in the tombs, and no one could bind him anymore, not even with a chain. 4 For he had often been chained hand and foot, but he tore the chains apart and broke the irons on his feet. No one was strong enough to subdue him. 5 Night and day among the tombs and in the hills he would cry out and cut himself with stones.
6 When he saw Jesus from a distance, he ran and fell on his knees in front of him. 7 He shouted at the top of his voice, “What do you want with me, Jesus, Son of the Most High God? In God’s name don’t torture me!” 8 For Jesus had said to him, “Come out of this man, you impure spirit!”
9 Then Jesus asked him, “What is your name?”
“My name is Legion,” he replied, “for we are many.” 10 And he begged Jesus again and again not to send them out of the area.
11 A large herd of pigs was feeding on the nearby hillside. 12 The demons begged Jesus, “Send us among the pigs; allow us to go into them.” 13 He gave them permission, and the impure spirits came out and went into the pigs. The herd, about two thousand in number, rushed down the steep bank into the lake and were drowned.
14 Those tending the pigs ran off and reported this in the town and countryside, and the people went out to see what had happened. 15 When they came to Jesus, they saw the man who had been possessed by the legion of demons, sitting there, dressed and in his right mind; and they were afraid. 16 Those who had seen it told the people what had happened to the demon-possessed man—and told about the pigs as well. 17 Then the people began to plead with Jesus to leave their region.
18 As Jesus was getting into the boat, the man who had been demon-possessed begged to go with him. 19 Jesus did not let him, but said, “Go home to your own people and tell them how much the Lord has done for you, and how he has had mercy on you.” 20 So the man went away and began to tell in the Decapolis[b] how much Jesus had done for him. And all the people were amazed.
The man runs to Jesus to see him. I don't think the demons were interested in visiting Jesus so this tells me the man still retained control of himself - mostly. So, no, I'm not voting "not guilty" because an demon influenced you. But, I do think demonic influence is a real thing.