We don’t have any hadith or religious teaching that encourages that. If it doesn’t cause serious harm to the person praying, it’s permissible to do that (it’s not haram), but one must not claim: this is a sign of faith or that Islam recommends us to do that.
As for Qama Zani or Zanjir, most scholars have stated it is permissible as long as it doesn’t cause harm or damage to the body. If it causes pain only it’s permissible. If it’s a normal wound that heals it’s permissible. But if it causes a serious wound that could harm the person’s health or even lead to death then it would be haram.