Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
As @RyanH. stated, make sure the redirect isn't being interrupted after the order takes place. Check the admin panel to see if the orders are actually coming through or not.
I would suggest using the StockRepository class to get the collection you desire or even better use interfaces e.g. StockRepositoryInterface. I can provide a working example, using interfaces, of what you're trying to accomplish if you want. I didn't provide it as an answer as it doesn't answer your specific question.
What exactly do you mean by inventory? In your code you're trying to load a collection of "Stock" objects. Is that what you are referring to as inventory here?