Yes, definitely agree that hard work alone is not a guarantee.
However, I’d posit a few other ideas I’d love your thoughts on:
(1) Hard work, while not guaranteed, is probably the safest bet you can place to achieve a certain goal, versus relying on luck or other life hacks
(2) If your environment is a limiting factor, hard work can include spending time trying to change the environment you’re in. Certain people (esp. North Americans or Europeans living in developed countries) certainly got lucky to be in a good environment, but (a) it doesn’t guarantee them success and (b) if one works hard enough at it, they can migrate to these countries as well.
(3) Depending how you frame success, doing your best at a particular task may be what you recognize as success, so in many ways it can be a self-fulfilling prophecy that brings you happiness and fulfillment in life.