There are some parallels between historical witch trials and trials of non-human animals in the same period, with a lot of the same procedures as were used when human beings were charged with a crime.
Research:
Sonya. “When Societies Put Animals on Trial.” JSTOR Daily. 9/13/2017. https://daily.jstor.org/when-societies-put-animals-on-trial/
Simon, Matt. “Fantastically Wrong: Europe's Insane History of Putting Animals on Trial and Executing Them.” Wired. 9/24/2014. https://www.wired.com/2014/09/fantastically-wrong-europes-insane-history-putting-animals-trial-executing/
MacGregor, L., (2019) “Criminalising Animals in Medieval France: Insights from Records of Executions”, Open Library of Humanities 5(1), 15. doi: https://doi.org/10.16995/olh.319
Macías, Francisco. “Animals on Trial: Formal Legal Proceedings, Criminal Acts, and Torts of Animals.” 2/9/2016. Library of Congress Blogs. https://blogs.loc.gov/law/2016/02/animals-on-trial/
Beirnes, Piers. “The Law is an Ass: Reading E.P. Evans’ ‘The Medieval Prosecution and Capital Punishment of Animals.’” Society and Animals. Vol. 2, No. 1. https://www.animalsandsociety.org/wp-content/uploads/2015/10/beirnes.pdf
MacGregor, Lesley Bates. “Criminalising Animals in Medieval France: Insights from Records of Executions.” Open Library of Humanities, Vol.5 (2019). https://olh.openlibhums.org/article/id/4552/
Chambers, R. “The Book of Days: A Miscellany of Popular Antiquities in connection with the Calendar.” London & Edinburgh. W&R Chambers. Vol. 1. 1879. https://archive.org/details/b22650477_0001/
Humphrey, Nicholas. “Bugs and Beasts Before the Law.” The Public Domain Review. 3/27/2011. https://publicdomainreview.org/essay/bugs-and-beasts-before-the-law/
Lee, Alexander. “Pigs Might Try.” History Today. Vol. 70, Issue 11, November 2020. https://www.historytoday.com/archive/natural-histories/pigs-might-try
Girgen, Jen. “The Historical and Contemporary Prosecution and Punishment of Animals.” Animal Law Review at Lewis & Clark Law School. Vol. 9:97 (2003). https://www.animallaw.info/article/historical-and-contemporary-prosecution-and-punishment-animals
Friedland, Paul. “Beyond Deterrence: Cadavers, Effigies, Animals and the Logic of Executions in Premodern France.” Historical Reflections / Réflexions Historiques , Summer 2003, Vol. 29, No. 2. Via JSTOR. https://www.jstor.org/stable/41299274
Leeson, Peter T. “Vermin Trials.” The Journal of Law & Economics , Vol. 56, No. 3 (August 2013). Via JSTOR. https://www.jstor.org/stable/10.1086/671480
Ewald, Willam. “Comparative Jurisprudence (I): What Was It like to Try a Rat?” University of Pennsylvania Law Review , Jun., 1995, Vol. 143, No. 6. Via JSTOR. https://www.jstor.org/stable/3312588
Sykes, Katie. “Human Drama, Animal Trials: What the Medieval Animal Trials Can Teach Us About Justice for Animals.” Animal Law Review, Vol. 17, No. 2, p. 273, 2011. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1999081
Srivastava, Anila. “’Mean, dangerous, and uncontrollable beasts’: Mediaeval Animal Trials.” Mosaic: An Interdisciplinary Critical Journal , March 2007. Via JSTOR. https://www.jstor.org/stable/44030162
Soderberg, Bailey. “Reassessing Animals and Potential Legal Personhood.” Vermont Journal of Environmental Law, Winter 2022, Vol. 24, No. 2. Via JSTOR. https://www.jstor.org/stable/10.2307/27201415
Carson, Hampton L. “The Trial of Animals and Insects. A Little Known Chapter of Mediæval Jurisprudence.” Proceedings of the American Philosophical Society , 1917, Vol. 56, No. 5. Via JSTOR. https://www.jstor.org/stable/984029
Hyde, Walter Woodburn. “The Prosecution and Punishment of Animals and Lifeless Things in the Middle Ages and Modern Times.” University of Pennsylvania Law Review and American Law Register, May, 1916, Vol. 64, No. 7. Via JSTOR. https://www.jstor.org/stable/3313677
Evans, E.P. “The Criminal Prosecution and Capital Punishment of Animals.” London : W. Heinemann. 1906. https://archive.org/details/criminalprosecut00evaniala/
Andersson, Ebba. “Murderous Pigs and Ex-Communicated Rats: Edward Payson Evans’ Handbook of Animal Trials.” Retrospect Journal. 3/7/2021. https://retrospectjournal.com/2021/03/07/murderous-pigs-and-ex-communicated-rats-edward-payson-evans-handbook-of-animal-trials/
Frank, Colin. “The pig that was not convicted of homicide, or: The first animal trial that was none.” Global Journal of Animal Law. Vol. 9. 2021. https://ojs.abo.fi/ojs/index.php/gjal/article/view/1736