As most aircraft accidents have a strong element of pilot error it follows that getting rid of the pilots will improve safety.
And what about systems and/or computer malfunction. Without pilots on board you are doomed.
Just look at the safety record where there are driverless trains. Case proved
Have yet to see a driverless train on a mainline or commuter route so case NOT proved.
If my memory serves me well, did Rockwell in the US not design a pilotless passenger aircraft way back in the eighties but did not persue it due to negative public opinion.
Oh and don't forget the pilotless B720 used for crash research. Crashed wide of target whilst out of control.
Commercial pilots will never be replaced even at Ryanair.