With all respect for the seal of the confession, there may be a difference between how a priest should behave following confession of a very serious sin verses how a priest might behave. Notice the priest you sited who suffered bodily torture for refusing to break the seal of confession is no longer called Father John Nepomucene but now SAINT John Nepomucene.
If someone has a serious felony to confess and knowledge of such a crime might place their priestly friend in complicated legal situation, I think it would be prudent to seek an annonymous confession with someone else. While it might be against Church law for a priest to break the seal of the confessional, it’s not against most civil laws. In some places, civil authorities might even persecute priest to try to get them to break the seal of the confessional. Grant you, the priest who refuses to break the seal of the confessional dispite threats of imprissonment or his tongue cut out might be on the fast track for sainthood, but not every priest is that saintly. Nor do I think a real friend would put their priestly friend in a potentially compromised situation. God offers grace and forgiveness, but Catholics shouldn’t make priest face jail and persecution if that can be easily be avoided by finding another confessor to hear the confession annonymously.