The production of $chi_{c1}(3872)$ and $psi(2S)$ hadrons is studied as a function of charged particle multiplicity in $pp$ collisions at a center-of-mass energy of 8 TeV, corresponding to an integrated luminosity of 2 fb$^{-1}$. For both states, the fraction that is produced promptly at the collision vertex is found to decrease as charged particle multiplicity increases. The ratio of $chi_{c1}(3872)$ to $psi(2S)$ cross-sections for promptly produced particles is also found to decrease with multiplicity, while no significant dependence on multiplicity is observed for the equivalent ratio of particles produced away from the collision vertex in $b$-hadron decays. This behavior is consistent with a calculation that models the $chi_{c1}(3872)$ structure as a compact tetraquark. Comparisons with model calculations and implications for the binding energy of the $chi_{c1}(3872)$ state are discussed.