There is precedent for the ICC [1], I believe a majority of all the ICC convictions were actually charging individuals committing crimes against their own people without crossing state lines.
The fact that China gets away with its treatment of the Uyghurs (and plenty of other major powers that technically break ICC laws) is definitely an example of how much international law is a farce, though they aren't getting around the ICC by staying within their own borders.