  Recently discovered superconducting P-doped EuFe$_2$As$_2$ compounds reveal
the situation when the superconducting critical temperature substantially
exceeds the ferromagnetic transition temperature. The main mechanism of the
interplay between magnetism and superconductivity occurs to be an
electromagnetic one and a short period magnetic domain structure was observed
just below Curie temperature [Stolyarov et al., Sci. Adv. \textbf{4}, eaat1061
(2018)]. We elaborate a theory of such transition and demonstrate how the
initial sinusoidal magnetic structure gradually transforms into a soliton-like
domain one. Further cooling may trigger a first-order transition from the
short-period domain Meissner phase to the self-induced ferromagnetic vortex
state and we calculate the parameters of this transition. The size of the
domains in the vortex state is basically the same as in the normal ferromagnet,
but with the domain walls which should generate the set of vortices
perpendicular to the vortices in the domains.
