I'd put the quality of the grinder above the quality of the beans, but that's assuming a certain minimum standard (e.g. whole beans from a supermarket brand).
If someone's using a blade grinder, then the particle size are going to be all over the place and you end up with a brew that's both over-extracted and under-extracted at the same time.
I'm not especially fussed about the espresso machine quality as I usually drink AeroPress coffee and as long as people aren't using boiling water, then it turns out fine (full immersion is a lot easier to get right than dialing in the specific grind for Espresso).