For groundhogs at 400, I'd take the AR. They tend to be capable of better accuracy. However, for humans I'd prefer the CETME. The AR isn't particularly ballistically-effective past 300 yards, and does not have very good penetration. Also, the wind really screws with them out past that distance. This stuff doesn't matter so much for critters like groundhogs -- they don't hide behind cover, they don't drive vehicles or wear armor, and you will probably have a little time to measure wind speed and calculate the hold-off if you're taking a groundhog shot at 400 -- the inherent accuracy of the rifle is more important. The ability to mount a big high-powered optic is also important, because obviously ground hogs are very hard to see at that distance.
But for 2-legged varmints that shoot back, I would prefer a firearm with a longer max effective range than what the AR offers -- you wouldn't want to engage them up close since that's what they're trained for and there will probably be more of them than you, so the smarter play would be to hang back past where most of them can't even hit, much less detect you, take a few shots, drop a few of them, and high tail it before they can flank you, get artillery on you, call in air support, etc.
Also, the 7.62x51 can be used to disable unarmored or lightly-armored vehicles. Good luck doing that with a 5.56. The CETME wouldn't be my first choice in the battle rifle category, but I would have to say I would take one over an AR for the second scenario you proposed.