This is being made WAY more complicated than it should be.
Player handles the ball on the line from an IDFK, is this DOGSO. To answer that you have to look at what would happen if he hadn't handled it, and the answer would be goal kick. So how can he have denied an OGSO, given that if he hadn't handled the ball if would have been a goal kick to HIS team? If anything he has helped create an OGSO, far from denying one.
In terms of cautioning or not, the laws are clear that a handling offence is not cautionable unless it prevents a promising attack. So in this scenario if he doesn't handle it the restart will be a goal kick, if he does handle it the restart will be a penalty. How on earth has that denies a promising attack, it has actually turned a goal kick for his team into a penalty for the opponents..!