Is 'grounding a desktop PC via 1MΩ resistor' unsafe when working inside the case?
Antistatic wrist strap, connected to the case of your desktop PC.

That is good advise provided the PC's mains power cable is disconnected !

Also good:

Antistatic wrist strap to ground connection, perhaps on a grounded ESD mat. PC placed on top of grounded ESD mat.

The PSU should be turned off, but still plugged into the wall outlet.

In my opinion this is bad advice. When connected to the mains many PC power supplies still provide 5 V standby voltage. Only when there is a toggle switch on the back of the PSU this would be safe if you use that switch to power off properly. Then the ground connection remains connected. But many PCs do not have a mains toggle switch at the back of the PSU, in that case the 5 V standby power will be present on the motherboard and then it is a bad idea to work inside the PC.