Many of the examples people have mentioned in this topic are what I would consider "fair", in the sense that anything that is dangerous looks dangerous, and you can tell if something is going to screw you over before it happens. In particular, if you fail, it could be said to be your fault in some sense. Yes, one could make it difficult, but as long as one can avoid damage (or recover after taking damage, if avoiding damage isn't possible), the game is, in a sense, fair.
On the other hand, if the game suddenly kills you for performing some reasonable action (like opening a door), *then* the game would be considered unfair.
(Incidentally, the idea for this topic came from seeing the game Celeste, a hard but fair platformer that wants the player to succeed. I am interested in a game designed with the same "wants the player to succeed" idea but that is intentionally not fair.)
With that said, there are a couple of interesting existing game that have been mentioned, namely Sunless Sea and Elder Sign, which aren't what they seem at first. I could actually say the same thing about Syoban Action; it appears to be a platformer, but actually plays more like a puzzle game, as you need to figure out how to get past each obstacle, only to find that the developer put a trap in there to not make your solution work.