In practice it does increase market cap because constantly buying back shares increases PE multiple growth which then makes the stock then sell at a higher valuations since they are showing (artificial) growth. The long term stability of those buybacks isn’t taken into account with valuation models.
Every new dollar put into index funds gets invested proportionally in each company to the market cap of SP 500. Microsoft gets bid nearly 4.5c on every dollar. The top 10 stocks combined get 25c on every dollar.