This writeup on the underground puzzle is worth reading, it's a pretty baffling "puzzle" design. https://pokemow.com/Gen2/ShutterPuzzle/
That said, it's definitely Gem's fault that it struggled so long, considering it ignored the NPCs that give clues.