The second magnetization peak (SMP) in the fourfold symmetric superconducting single crystals (such as iron pnictides and tetragonal cuprates) has been attributed to the rhombic-to-square transition (RST) of the quasi-ordered vortex solid (the Bragg vortex glass, BVG). This represents an alternative to the pinning-induced BVG disordering as the actual SMP mechanism. The analysis of the magnetic response of BaFe2(As1-xPx)2 specimens presented here shows that the SMP is not generated by the RST. However, the latter can affect the pinning-dependent SMP onset field if this is close to the (intrinsic) RST line, through the occurrence of a "shoulder" on the magnetic hysteresis curves m(H), and a maximum in the temperature variation of the DC critical current density. These features disappear in AC conditions, where the vortex system is dynamically ordered in the RST domain, emphasizing the essential role of vortex dislocations for an efficient accommodation of the vortex system to the pinning landscape and the SMP development. The m(H) shoulder is associated with a precipitous pinning-induced proliferation of dislocations at the RST, where the BVG elastic "squash" modulus softens. The DC magnetization relaxation indicates that the pinning-induced vortex system disordering continues above the RST domain, as the basic SMP mechanism.