I made my brother quit with a simple infusion with very (I mean VERY) hot peppers.
It is quite simple. Few dried red hot peppers are ground in a mortar and boiled in a cup of water until half of it evaporates.
The resulting infusion is dipped with a pipette on the nail tips and if possible, under the nails too.
A pair of glasses were needed, because my brother touched his eye accidentally once and was cursing me like a witch.
Worked just fine though.
Each time my bro bit his nails, the red pepper was biting his tongue in response.
We did this for one week and he quit.
The only downside is - each time you wash your hands, the infusion needs to be reapplied.