I'm pretty sure they can just loophole their way out of that problem. If they really want to, they can just change the definition of "digital purchase" so that they can just say it's an overglorified rental and force you to buy it again after 5-10 years. And by that point, the game might not be on sale at all... Everyone wants entertainment in general to go the way of Netflix, after all, so buying games might not be as good as subscriptions for their games, at which point they can add or substract games as they please, who is going to stop them? You didn't buy the game, it's not yours.
And also, for most of games they wouldn't even need to be that crafty. Just imagine how many mp-only games are going to become obsolete on consoles once the servers are down, without the need of subterfuge.
Like I said this has been the way PC gaming has been for years no issues.
Your under the impression that these companies can just put whatever they want in their agreements and there good to go. That's not how it works. If I write a contract that says your my slave for life and you sign it that doesn't make it legally binding. Sony,MS, and whoever else can write whatever they want in their agreement but at the end of the day consumer protection laws are what matters and the only thing the judge will care about. In the US some of this stuff might actually work because consumer protection laws are crap here. I haven't taken a deep look into them to verify it though. In places like Australia and Europe they do not mess around with this kind of stuff and would heavily fine these companies for trying to circumvent these laws.
For instance if you preorder a game digitally in the US Sony doesn't have to give you a refund before the game releases (or ever). In Europe they are required to and no amount of agreements or fancy lawyer tricks will get them around that. They would have already done it if they could.