It is not the same because penalties are 0.79 xG that are usually gifted to the penalty taker. It comes down to not the individual brilliance but to the quality of team. Including penalties that Ronaldo and Messi have won or were invovled in is fine, but majority of penalties are a result of team effort and quality irrelevant of the individual. For example, if it turns out that Real is winning penalties at a higher rate than Barcelona (excluding penalties both were involved in) this is very favorable for Ronaldo as a penalty taker of Real. It could perhaps be the other way around, that Messi was more favored in that regard. Whatever is the result, it is not negligeable So it is not the same as assists at all.