We theoretically obtain the phase diagram of localized magnetic impurity spins arranged in a one-dimensional chain on top of a one- or two-dimensional electron gas. The interactions between the spins are mediated by the Ruderman-Kittel-Kasuya-Yosida mechanism through the electron gas. Recent work predicts that such a system may intrinsically support topological superconductivity without spin-orbit coupling when a helical spin-density wave is spontaneously formed in the spins, and superconductivity is induced in the electron gas. We analyze, using both analytical and numerical techniques, the conditions under which such a helical spin state is stable in a realistic situation in the presence of disorder. We show that (i) it appears only when the spins are coupled to a (quasi-) one-dimensional electron gas, and (ii) it becomes unstable towards the formation of (anti) ferromagnetic domains if the disorder in the impurity spin positions delta R becomes comparable with the Fermi wavelength. We also examine the stability of the helical state against Gaussian potential disorder in the electronic system using a diagrammatic approach. Our results suggest that in order to stabilize the helical spin state and thus the emergent topological superconductivity under realistic experimental conditions, a sufficiently strong Rashba spin-orbit coupling, giving rise to Dzyaloshinskii-Moriya interactions, is required.