Tips to stop harmful stimming?

I’m (15F) specifically referring to scratching. I scratch my legs a lot when I’m overstimulated, I’ve been doing it for years and it’s left deep scars on me (literally). Not to mention, it hurts once the overstimulation stops and I snap back to reality. It’s damaging my skin too, as someone with already very sensitive skin—I bleed and rip skin off practically every time. It’s unbearable when I don’t scratch myself. I’ve tried cutting my nails short but I still somehow manage to hurt myself when they’re short. Any help would be much appreciated.