But even if these children were being racist, no school should have a policy that manages racism from children by screaming at them, shaming them and threatening to kick them out.
These are CHILDREN. They are year 8. If they came from a home where the parents were Holocaust deniers or people traffickers, they may well be so emersed in racism at home that they repeat awful phrases at school. They may behave badly to students of certain backgrounds.
No school should deal with that with the approach this teacher used. The only way is to discuss, explore, appropriately challenge, expose them to alternate views, widen their horizons and experiences and support them to navigate the world whilst beginning to see that they can have different thoughts and opinions to the ones the adults around them espouse.
Schools deal with very difficult situations all the time. There are thousands of pupils who risk harming the children around them with their words or actions. In the main, schools and agencies manage these situations by centring the children and acknowledging their youth and vulnerability, their age being a factor in them not being criminally responsible etc
The idea that you manage any young person who is racist/sexist/sexually abusive/insults those of faith etc by screaming at them, shaming them and excluding then is so obviously unsustainable and doesn't benefit anyone at all.
Teachers are (usually) skilled, experienced educators who manage difficult conversations/conflict with confused young people really well. Part of educating teenagers is exactly about helping them assimilate different views, think through new ideas, see others' views as equally valid etc. It's part of growing up that they need support with.