Taken to the extreme, there would finally be 1 share left held by someone and thus that person would own 100% of the company and be entitled to 100% of the profits from said company. The company cannot just buy the last stock because the stock itself is worth all the cash the company holds and the future profits it will make. Saving up more cash to buy the final stock just raises the price because the stock is entitled to that cash and nobody is going to loan a company enough cash to be worth the expected future profits of said company which makes up the remainder of the shares value.
Funnily enough though, I think they would still do share buybacks by first splitting the stock and then buying a subset of the split stock because then the sole owner would only have to pay taxes on the sale price minus the price he paid for the stock whereas dividends are taxed in their entirety.