Microfluidic technology applied for the controlled production of double emulsions has gained significant interest in biomedicine and material synthesis. The precise regulation of emulsion size depends on the in-depth study of the formation mechanism. A ternary multiple-relaxation-time lattice Boltzmann model with robust stability and multiphase accuracy is established and applied to investigate the formation mechanism of double emulsions within a flow-focusing microchannel. Integrated with the regularized and convective boundary conditions, the present model proves adept at simulating the complex multiphase flow behavior in microchannels under various properties and operation parameters. Extensive validations involving static and dynamic cases demonstrate the model accuracy in capturing three-phase interactions and multiphase flow fields while also significantly enhancing stability and accommodating a broader range of viscosity ratios. Our systematic investigation involves the influence of flow rate, viscosity ratio, interfacial tension ratio, and orifice section size on the formation of double emulsions. The results show the impact of flow rate on flow patterns and inner phase volume, revealing an expanded operation range of the dripping pattern brought by the increased outer phase flow rate. Notably, two distinct droplet formation mechanisms, i.e., shear mode and squeeze mode, are identified across a wide range of viscosity ratios. Additionally, the investigation of interfacial tension ratios focuses on assessing the effect of various interfacial tension combinations, while alterations in orifice width reveal its significant impact on shear strength and dispersed phase dynamics. This work deepens the understanding of double emulsion mechanics and offers a versatile platform for future research.