Authorities said the derailed cars were carrying consumer goods and didn’t pose any risk to the public.