I do not believe in magic. I doubt this would have happened, if he had never found out or known that they tried black magic on him. I believe the fear of the magic drove him crazy, not the magic. I also believe that the thought of being delivered from the magic, is what cured him also.
Maybe the villagers were already poisoning him. When he went with the missionaries he was able to clear the poison from his system.
I see your up to your enticments again. How many questions will you ask or create this time which none will satisfy your itchy ears?