I am a nail biter and also a finger nail/finger mutilator. I bite my finger nails and the surrounding skin so badly at times it does hurt and the skin bleeds. My husband will comment on how painful they look. My nephew went through a similar excessive nail biting phase as a preteen. My sister in law came to me because she figured I would understand why he was doing what he was doing. I mention this just so you know your son is not the only one.
I have learned my bad habit occurs when I am deeply in thought which is rather a problem at work. I go all weekend and am fine; come Monday morning it starts all over again. Holidays are nice because my fingers actually have a chance to heal. I have worked very hard to break the habit and chew so much bubble gum I should buy stock. Depending on why your son is doing it, the habit can be difficult to break so fair warning. I almost never realize I am doing it until my hands are a mess.
My mother tried all of the remedies - bitter/foul tasting polishes, jalapeno juice, hot sauce, gloves, tape, etc. She rode me like a steeplechase jockey on the matter. All to no avail since I still bite my finger nails and fingers. Unintentionally my mother made me feel enormous shame and guilt on the matter so I would caution you on your approach. She will be the first to say all she was trying to do was help me. However, all I remember is the constant nagging and the frustration in her voice. I felt like a miserable failure because I couldn't that one little thing she seemed to want most. Even now I detest being reminded to get my hands out of my mouth. Nagging never solved anything. With my toddler I don't say anything. I just reach over and gently pull his hands out of his mouth. If he persists for a few minutes, then I take him to go wash his hands to redirect his mind. Good luck.