It could be extremely hard. We don't have many good ways to measure how far away objects are in space. In fact the main way we have been estimating distance so far is by measuring red shift. We also have very limited means for measuring the density of the intergalactic medium.
I just don't think we have any good ways to distinguish whether a high redshift is due to the object being very distant or the intergalactic medium in that direction being particularly dense, for most objects.
I just don't think we have any good ways to distinguish whether a high redshift is due to the object being very distant or the intergalactic medium in that direction being particularly dense, for most objects.