Context. Near- to mid-infrared observations (from Spitzer and JWST) have revealed a hidden population of galaxies at redshift z = 3 − 6 called optically dark objects, which are believed to be massive and dusty star-formers. They contribute substantially to the cosmic star-formation rate (SFR) density at z ∼ 4 − 5 (up to 30 − 40%). Aims. While optically dark sources are widely recognized as a significant component of the stellar mass function, the history of their stellar mass assembly (and the evolution of their interstellar medium) remains unexplored. However, they are thought to be the progenitors of the more massive early-type galaxies found in present-day groups and clusters. It is thus important to examine the possible connection between dark sources and merging events in order to understand the environment in which they live. Methods. Here, we report our search for close companions in a sample of 19 optically-dark objects identified in the SMACS0723 JWST deep field. They were selected in the NIRCam F444W band and undetected below 2 μm. We restricted our analysis to the reddest (i.e., F277W–F444W > 1.3) and brightest (F444W < 26 mag) objects. Results. We identified KLAMA, an optically dark source showing a very close companion (angular distance < 0.5″). The spatially resolved SED fitting procedure indicates that all components lying within 1.5″ of who is it the dark source are indeed at z ∼ 5.7. Tidal features (leading to a whale-shaped morphology) corroborate the hypothesis that KLAMA is the most massive (log(M⋆/M⊙) > 10.3) and dusty (AV ∼ 3 at the core) system of an ongoing merger with a mass ratio of ∼10. Thus, around ten similar merger events would be required to double the stellar mass of KLAMA. Merging systems with properties similar to KLAMA are identified in the SERRA simulations, allowing us to reconstruct their stellar-mass assembly history and predict their molecular gas properties (in particular, the [CII] emission for the simulated system). Conclusions. The discovery of mergers within dark galaxies at the end of the Epoch of Reionization highlights the importance of conducting a statistical search for additional candidates in deep NIRCam fields. Such research will aid in our understanding of the significance of merging processes during the obscured phase of stellar-mass accumulation.