I found an interesting article by Edward Harrison  who proposed a way to harness energy from spacetime expansion by attaching a string to a receding cosmic object (like a galaxy). However, one could not extract unlimited energy as the string would break once the object goes beyond the Hubble sphere (Similar to how a rope would break if we let the attached object fall into the event horizon of a black hole).
I was thinking that perhaps one could avoid the problem by attaching a string to an object, let the string unwind to get as much energy as we can from the receding object until it reaches the Hubble length, then use part of the energy that we obtained from the unwinding string to create a new object with the same mass and at the same distance as the previous one and repeat the process indefinitely. But I have been told that the energy that you would gain due to the tension of the string attached to the receding object upon reaching the cosmological horizon would be the same to the required for creating a new object with the same mass.
Also, I am not sure if the energy you get is lower than the predicted due to gravitational redshift, i.e. the same way this paradox is resolved.
Perhaps one way to avoid this would be to attach the string to a star, so even if the energy we would get from it due to the Hubble flow would be the same amount needed to make a new star at the same distance as the previous one initially, we would gain energy from the star itself as heat and brightness. Would this work? Or would energy be conserved somehow?