Context. Directly imaged planets and substellar companions are key targets for the characterization of self-luminous atmospheres. Their photometric appearance at 4–5 μm is sensitive to the chemical composition and cloud content of their atmosphere. Aims. We aim to systematically characterize the atmospheres of directly imaged low-mass companions at 4–5 μm. We want to homogeneously process the data, provide robust flux measurements, and compile a photometric library at thermal wavelengths of these mostly young, low-gravity objects. In this way, we want to find trends related to their spectral type and surface gravity by comparing with isolated brown dwarfs and predictions from atmospheric models. Methods. We used the high-resolution, high-contrast capabilities of NACO at the Very Large Telescope (VLT) to directly image the companions of HIP 65426, PZ Tel, and HD 206893 in the NB4.05 and/or M′ filters. For the same targets, and additionally β Pic, we also analyzed six archival VLT/NACO datasets which were taken with the NB3.74, L′, NB4.05, and M′ filters. The data processing and photometric extraction of the companions was done with PynPoint while the species toolkit was used to further analyze and interpret the fluxes and colors. Results. We detect for the first time HIP 65426 b, PZ Tel B, and HD 206893 B in the NB4.05 filter, PZ Tel B and HD 206893 B in the M′ filter, and β Pic b in the NB3.74 filter. We provide calibrated magnitudes and fluxes with a careful analysis of the error budget, both for the new and archival datasets. The L′–NB4.05 and L′–M′ colors of the studied sample are all red while the NB4.05–M′ color is blue for β Pic b, gray for PZ Tel B, and red for HIP 65426 b and HD 206893 B (although typically with low significance). The absolute NB4.05 and M′ fluxes of our sample are all larger than those of field dwarfs with similar spectral types. Finally, the surface gravity of β Pic b has been constrained to log g = 4.17−0.13+0.10 dex from its photometry and dynamical mass. Conclusions. A red color at 3–4 μm and a blue color at 4–5 μm might be (partially) caused by H2O and CO absorption, respectively, which are expected to be the most dominant gaseous opacities in hot (Teff ≳ 1300 K) atmospheres. The red characteristics of β Pic b, HIP 65426 b, and HD 206893 B at 3–5μm, as well as their higher fluxes in NB4.05 and M′ compared to field dwarfs, indicate that cloud densities are enhanced close to the photosphere as a result of their low surface gravity.