Asking about high pH makes the question difficult to answer Larry. pH is one measurement of the strength of a chemical, but rarely do you find one single component that reads a high pH alone on a textile.
If a single chemical component, such as trisodium phosphate, was present on carpet, it in itself would likely not cause resoiling. Chemicals such as sodium hydroxide or sodium metasilicate might cause color loss on acid dyed textiles, such as nylon or wool, however.
Most resoiling occurs from surfactant residue, and as surfactants are often used in cleaning formulations that have alkaline components, one could then say such a residue could attract soil.
Of course, an acid based detergent, such as might be used to clean upholstery or natural fiber rugs could also cause resoiling based on the residue of the surfactant, not the pH of the residue.
Shawn Forsythe will likely answer the question in a more technically correct fashion, but the above explanation has been what I've experienced.