Yes. But it can only be counted as a success if your profits allow you to reduce your debt. Manufacturing goods can be quite capital intensive, which is why companies often have to take on debt to make things.
>pump up the stock price and enrich the current shareholders.
The problem here is that doing anything else as a publicly traded company is illegal. But also consider that shareholders loose everything they invested if the stock price goes to zero.
>We used to call the latter a Ponzi scheme and put people in prison for it.
That is not a Ponzi scheme.