Police have charged a man with several offences in connection to a train derailment near Wollongong that left four people injured.