We extend a recently proposed ternary free-energy lattice Boltzmann model with high density contrast [Phys. Rev. Lett. 120, 234501 (2018)] by incorporating wetting boundaries at solid walls. The approaches are based on forcing and geometric schemes, with implementations optimized for ternary (and, more generally, higher-order multicomponent) models. Advantages and disadvantages of each method are addressed by performing both static and dynamic tests, including the capillary filling dynamics of a liquid displacing the gas phase and the self-propelled motion of a train of drops. Furthermore, we measure dynamic angles and show that the slip length critically depends on the equilibrium value of the contact angles and whether it belongs to liquid-liquid or liquid-gas interfaces. These results validate the model capabilities of simulating complex ternary fluid dynamic problems near solid boundaries, for example, drop impact solid substrates covered by a lubricant layer.