For further clarification, I appended a picture (sorry, it’s in German).
As you might have guessed, I am not an electrician, but from my understanding the situation is as follows:
In case there was only L + N available, (D: SchuKo) wall outlets with ground contact would not have been allowed to install at any time. Only outlets for insulation protected devices would be suitable. -> square in a square symbol
If L + PEN was available, L has to be wired to the outlet socket, PEN has to be wired to the ground contact and then to the other outlet contact. Reason: In case the connection between outlet contact and ground contact fails, ground contact is still connected to PEN.
If L + PE + N is available, the issue is clear in regard to wiring, but you have also an easy option to retrofit an RCD (GFCI/RCCD however the correct term is - on a side note, the RCD won’t save you if PEN breaks before the RCD).
In this case we are looking at L + PEN (I guess, since outlets with ground contact would have never been allowed otherwise).
Failure mode 1: Ground contact not connected to PEN, connected device fails, housing gets shorted to live -> people will die.
Failure mode 2: Ground contact not connected to PEN, PEN breaks inside the wall, device won’t work, defective device still could kill someone.
Failure mode 3: Ground contact connected to PEN, connected device fails, housing gets shorted to live -> circuit breaker might trip, people might survive.
Failure mode 4: Ground contact connected to PEN, PEN breaks inside the wall, housing gets live -> people will die.
Both options are both not satisfying, but connecting the ground contact to PEN inside the outlet favors the odds of a device failing over the odds of PEN failing inside the wall.
At least that is as far as my understanding goes. In case you disagree: Please elaborate, I am willing to learn more about all of this.