WorkSafe has started legal action against six companies over incidents that involved several workers' deaths in Western Australia.