The influence of short-range interactions between a multi-phase, multi-component mixture and a solid wall in confined geometries is crucial in life sciences and engineering. In this work, we extend the Cahn-Hilliard model with dynamic boundary conditions from a binary to a ternary mixture, employing the Onsager principle, which accounts for the cross-coupling between forces and fluxes in both the bulk and surface. Moreover, we have developed a linear, second-order and unconditionally energy-stable numerical scheme for solving the governing equations by utilizing the invariant energy quadratization method. This efficient solver allows us to explore the impacts of wall-mixture interactions and dynamic boundary conditions on phenomena like spontaneous phase separation, coarsening processes and the wettability of droplets on surfaces. We observe that wall-mixture interactions influence not only surface phenomena, such as droplet contact angles, but also patterns deep within the bulk. Additionally, the relaxation rates control the droplet spreading on surfaces. Furthermore, the cross-coupling relaxation rates in the bulk significantly affect coarsening patterns. Our work establishes a comprehensive framework for studying multi-component mixtures in confined geometries.