Hidden-charm exotic hadrons will be searched for and investigated at future electron-ion colliders. For instance, the X(3872) can be produced through the exclusive process γp→X(3872)p. The vector meson dominance model has been commonly employed in estimating the cross sections of such processes. However, the coupled-channel production mechanism through open-charm meson-baryon intermediate states may play a crucial role. To assess the significance of such contributions, we estimate the cross section of the γp→X(3872)p reaction assuming the coupled-channel mechanism. For energies near the threshold, the total cross section is predicted to be of tens of nanobarns for γp→X(3872)p, which can be measured at future experimental facilities. Furthermore, the open-charm coupled-channel mechanism leads to a distinct line shape of the total cross section that can be utilized to reveal the production dynamics.