In general relativity one has the Hilbert stress-energy tensor defined as
$$T^{\rm matter}_{ab} = -\frac{2}{\sqrt{-g}}\frac{\delta S_{\rm matter}}{\delta g^{ab}}~,$$
which is covariantly conserved i.e $$\nabla_a T^{ab}_{\rm matter} = 0~.$$ In deriving this one assumes that the total action functional (matter action and the gravitational action) is diffeomorphism invariant which means that the above equation is valid on-shell, since a diffeomorphism would also (in general) change the fields.
My question is as follows:
Does this conservation have anything to do with actual translational invariance?
I understand that the stress tensor defined in field theories in flat space time can be related to the Hilbert stress tensor, or look at diffeomorphisms due to Killing vectors in curved spacetimes. But what I mean is that for example, for a perfect fluid in FLRW spacetime, one has a time dependent metric and also the covariant conservation of the stress tensor. So although time-translational invariance is not a feature of the background, we still have a conserved stress tensor.