Topological defect formation and spontaneous symmetry breaking in ion Coulomb crystals