Crabs are scavengers for sure, but they're also higher on the food chain compared to fish IMO. So while we add slower, smaller, peaceful ones like hermits and sometimes people add emeralds for nuisance algae ultimately, they're going to look for food if their hungry, and they eat lots of things.
With that said only truly safe reef crab I know of is Anemone Crabs and Trapezia Pocillopora/Acropora Crabs, as they are "hosters" rather than free agents. However these aren't really CUC material either. They're hobby/interest specific.
Others statistically eventually most of the time start attacking other inhabitants, whether fish, or coral. With the exception of Hermits, But I think it's a size and speed thing.