Strings of equally spaced particles, also called particle trains, have been employed in several applications, including flow cytometry and particle or cell encapsulation. Recently, the formation of particle trains in viscoelastic liquids has been demonstrated. However, only a few studies have focused on the topic, with several questions remaining unanswered. We here perform numerical simulations and experiments to elucidate the effect of the confinement ratio on the self-ordering dynamics of particles suspended in a viscoelastic liquid and flowing on the centerline of a microfluidic channel. For a fixed channel size, the particles self-order on shorter distances as the particle size increases due to the enhanced hydrodynamic interactions. At relatively low linear concentrations, the relative particle velocities scale with the fourth power of the confinement ratio when plotted as a function of the distance between the particle surfaces normalized by the channel diameter. As the linear concentration increases, the average interparticle spacing reduces and the scaling is lost, with an increasing probability to form strings of particles in contact. To reduce the number of aggregates, a microfluidic device made of an array of trapezoidal elements is fabricated and tested. The particle aggregates reduce down to 5% of the overall particle number, significantly enhancing the ordering efficiency. A good agreement between numerical simulations and experiments is found.