The law already disagrees with you around whether religion is a protected characteristic, so this point is largely moot, especially when you factor in the application of the McPherson principle around offense that is the accepted starting point in UK law.
You could teach exactly the same lessons around blasphemy using Monty python's life of brian as the example, and also would nicely cover the change in attitudes over the years, while not being anywhere near as risky in terms of offence.
https://www.bbc.com/culture/article/20190822-life-of-brian-the-most-blasphemous-film-ever
Thats what the teacher should be punished for, by the way, not showing the cartoon, but thinking showing the cartoon was both appropriate and a good idea.