Interesting question, and not one I had considered before. In MotoGP, so-called long-lap penalties were introduced a few years ago, primarily to punish track-limits transgressions, I believe. A rider is forced to ride through a designated extra piece of track, which is some seconds slower than the normal line.
I have never heard of F1 considering such ideas.
The Magnussen situation is an interesting one, and one on which there are different views. He held up a train of cars in Jeddah to benefit his Haas team-mate Nico Hulkenberg who was, as a result, able to make his pit stop and come out ahead of them and score a point.
That is understandable in the circumstances. Where it becomes less justifiable is that the Dane was ahead of RB’s Yuki Tsunoda only after overtaking him off the track, for which he earned one of his two 10-second penalties.
It does seem questionable that, having made an illegal overtake, he was then able to use the position he gained to compromise the races of others. This, it seems, will be brought up with the FIA by rivals before the next race in Australia.