It’s not quite that simple, though. GDPR is only concerned with personally identifiable information. Answers and comments on SO rarely contain that kind of information as long as you delete the username on them, so it’s not technically against GDPR if you keep the contents.
You could argue that people can be identified by their writing style. I have no idea how far you’d get with that though.
Frankly I don’t see any way whatsoever that this would fly, and that’s a good thing!
Imagine what it would mean for software-development if one angry dev could request the deletion of all their contributions at a moments notice by pointing to a right to be forgotten. Documentation is really not meaningfully different from that.