In principle only, if a barrier could keep a train on its side of the barrier, scraping along the barrier for a long distance instead of smashing headfirst into it, the energy could be dissipated over a long period of time, preventing fatalities. But what kind of barrier can withstand a train?