Contact modeling is an active research area in the field of multibody dynamics. Despite the important research effort, two main challenging issues, namely accuracy and speed, are not yet jointly solved. One main issue remains the lack of model order reduction schemes capable to efficiently treat systems where multiple, a priori unknown, input-output locations are present. This work first analyzes the importance of including the necessary residual attachment modes by numerical simulation of two gears meshing in an ad-hoc flexible multibody model. Given the large number of residual attachment modes needed, the methodology named static modes switching is extended and successfully applied to improve efficiency. The method proposes an on line selection of residual attachment modes for accurate local deformation prediction. The applicability to impact problems is discussed through numerical experiments and the automatic selection strategy is based purely on geometrical information. Results show that the method can be applied to gear meshing simulation, obtaining a high level of accuracy while preserving computational efficiency. Comparisons are made between modally reduced models, full nonlinear finite element and the proposed strategy