A former Walsall teacher has been banned from the profession after engaging in online sexual communication with an undercover police officer pretending to be a 13-year-old girl.