Tangential (and not my area of expertise), but I do know that the Ingenuity helicopter uses an off-the-shelf Snapdragon 801 SoC. As I understand it that is very unusual for any projects like this, let alone something like the JWST.
It has always been a specific goal of the Mars rovers since the very first one, to use a faster/cheaper design and production process than traditional Nasa projects.
In essense, using more off the shelf parts for the Mars rovers is part of the science experiment.
This was true of the first rover (Pathfinder ‘97) but really hasn’t been true of rovers since then. Ingenuity was an exception re: COTS parts since it was experimental.
Pathfinder cost <$300M. “Better cheaper faster” became Discovery class missions, “capped” at $500M. Curiosity and Perseverance cost about $2.5B each. Not in the same category.
In essense, using more off the shelf parts for the Mars rovers is part of the science experiment.