Conditions of optimal (synchronized) collisions of any number of solitons and breathers are studied within the framework of the Gardner equation (GE) with positive cubic nonlinearity, which in the limits of small and large amplitudes tends to other long-wave models, the classic and the modified Korteweg-de Vries equations. The local solution for an isolated soliton or breather within the GE is obtained. The wave amplitude in the focal point is calculated exactly. It exhibits a linear superposition of partial amplitudes of the solitons and breathers. The crucial role of the choice of proper soliton polarities and breather phases on the cumulative wave amplitude in the focal point is demonstrated. Solitons are most synchronized when they have alternating polarities. The straightforward link to the problem of synchronization of envelope solitons and breathers in the focusing nonlinear Schrödinger equation is discussed (then breathers correspond to envelope solitons propagating above a condensate). K E Y W O R D S amplitude in the focal point, Gardner equation, Korteweg-de Vries equation, modified Korteweg-de Vries equation, nonlinear Schrödinger equation, optimal focusing of solitons and breathers Stud Appl Math. 2019;142:385-413.wileyonlinelibrary.com/journal/sapm