BRUSSELS—A terrorism trial starting here on Thursday highlights the difficulties Europe’s courts and prisons face containing the spread of jihadist ideology behind bars. Mehdi Nemmouche, a 33-year-old Frenchman of Algerian origin, faces life in prison for allegedly shooting and killing four people at the Brussels Jewish Museum in May 2014. But once in prison, law-enforcement officials warn, terror suspects and convicts breed even more plots and spread their ideology to other inmates. European prisons are fertile recruiting ground for new terrorists despite efforts in France, Belgium and other European countries to isolate dangerous and radicalized suspects in dedicated wards to...