McCaffrey is definitely more valuable than a replacement guy as a passing target.
As just a runner, however, RBs aren't worth much cap space. A running game is mostly fueled by the offensive line and the system.
The 49ers don't need McCaffrey.
They're great regardless of who they play in his position.