Original thought experiment said matter you're talking about total energy in your response. We ought to take matter to mean ordinary every day matter, mass being the property that all regular ordinary matter posses. Since that's normal everyday language.
Yes in a closed universe the net energy is 0, nothing in; nothing out, so you wouldn't be able to magically 'pop' mass into one place without taking from somewhere else.
Now if mass A is 100 meters away from mass B it would take X amount of energy to push/pull them together. If they are now 150 meters apart now the energy required to bring them together is now higher.
So if galaxies are pulling away and away from each other over time then overtime the energy you would need to bring them closer together again increases.
Your original thought experiment asked about the energy required to push all the matter to one place. But to even try to formulate such a question in GR, "matter" has to mean "whatever stress-energy is present in the universe". And "energy" has to mean the same thing, because stress-energy is what "does stuff" in GR, not "mass".
> that's normal everyday language
You can't do physics in normal everyday language.
> in a closed universe the net energy is 0, nothing in; nothing out, so you wouldn't be able to magically 'pop' mass into one place without taking from somewhere else.
The fact that you can't "magically pop mass into one place" is true in any spacetime in GR, not just a closed universe; it's a consequence of the Einstein Field Equation and the Bianchi identities. You also can't magically "take" mass from some place, for the same reason.
> if mass A is 100 meters away from mass B it would take X amount of energy to push/pull them together. If they are now 150 meters apart now the energy required to bring them together is now higher.
These statements are only valid in the particular cases I have already listed: an asymptotically flat spacetime, or a stationary spacetime. An expanding universe is neither.
I understand that you don't get this; that's because you are using ordinary language, but, as I said above, you can't do physics in ordinary language. Your reasoning looks OK to you because you don't understand that, except in the special cases I described, the ordinary language you are using does not correspond to any valid physics. (I have explained why in other subthreads in this discussion.) I know it looks to you like it ought to; but it doesn't.
The focusing theorem basically says that an initially converging congruence converges more quickly in the future, and an initially diverging congruence diverges less quickly in the future.
The Raychaudhuri picture for your pair of masses is fairly straightfoward given that the small distances can effectively wash out any coupling to the metric expansion of space. If the masses are small (i.e., we're not talking about two black holes) the background gravitational metric is effectively flat, perturbed only by mass A and B. This lets us determine exactly the factors opposing recollapse of your initially-diverging mass A and mass B. We can also be confident that an initial impulse could drive the separation, with the focusing theorem behind the eventual collision between A and B.
At larger length scales the metric expansion of space becomes important, so the background gravitational metric is instead Friedmann-Lemaître-Robertson-Walker (FLRW) or similar. We can still talk about Raychaudhri focusing in that context, but we take "... will diverge less quickly in future" slightly differently depending on whether the galaxies are flying apart because of an initial impulse (i.e., the expansion is inertial), or whether there is also a cosmological constant (i.e., the expansion is accelerating).
In the inertial case, the ultimate recollapse depends on a critical value in the (average) energy-density of the whole universe. Returning to your mass A and mass B picture, in the previous case with a flat background spacetime where A and B colliding is inevitable, in the inertially-expanding spacetime the initial impulse on A and B can lead them to never meet again, even given infinite time.
In the case of a small positive cosmological constant (which best explains what we see in redshift surveys), heavy nearby galaxies will take their time to separate compared to lower-mass galaxies with similar separation, or the same heavy galaxies which formed with a larger separation. The Raychaudhuri focusing theorem adapted to this setting tells us whether the galaxies will merge or not, and this is useful in understanding the spatial extents and masses of galaxy clusters. Returning to mass A and mass B, given a positive cosmological constant, no initial impulse is necessary; the CC alone can determine whether they will be separate forever, or whether they will eventually collide.
Returning to your final paragraph, the (average) energy-density must be over some critical value for distant galaxies to come into contact with each other, and that critical value for all practical purposes only depends on the value of the cosmological constant (if any).
So far, with decades of trying to measure the average energy-density and critical value, it's safer to say that distant galaxies will lose contact with each other. There is no known mechanism to change that for arbitrary sets of galaxies.
Note that I have not discussed energy above except as energy-density (which is energy per unit volume, particularly where the volume is very very small) averaged across the entire cosmos, and the invariant masses of your A and B and of galaxy clusters.
Finally, for completeness, clusters of galaxies are known to move strikingly against the cosmological coordinates, leading to some famous cluster-cluster collisions (e.g. the Bullet Cluster). Why they don't just float at the same cosmological coordinate (remember the coordinates expand) like the overwhelming majority of galaxy clusters is a topic of active research. However, perhaps some late-time impulse could drive initially diverging galaxies (carried for all practical purposes only by the cosmological constant) into a collision in a way that matches your final paragraph. (Alternatively these collided galaxies might never have been diverging in the first place).
Original thought experiment said matter you're talking about total energy in your response. We ought to take matter to mean ordinary every day matter, mass being the property that all regular ordinary matter posses. Since that's normal everyday language.
Yes in a closed universe the net energy is 0, nothing in; nothing out, so you wouldn't be able to magically 'pop' mass into one place without taking from somewhere else.
Now if mass A is 100 meters away from mass B it would take X amount of energy to push/pull them together. If they are now 150 meters apart now the energy required to bring them together is now higher.
So if galaxies are pulling away and away from each other over time then overtime the energy you would need to bring them closer together again increases.