Yeah, if the share price goes down due to change in public sentiment and buying habits, the stock buyback essentialh wasted money.
But if the price remains steady or goes up in any nominal way, the stock buy back nets them tons of cash. If steady, not tons of cash but plenty of ‘control’ of corporate direction.