To the OP:
In 5e it is even better: the class doesn't even matter.
Your dwarven locksmith does not need to be a rogue, but can be any class!
And with a feat from Xanathar's / Unearthed Arcana / Homebrew, you can get as good as the rogue with expertise in thieves' tools.