This question already has an answer here:
Now, if you have asked an average/basic question (say steps in an existing Proof you didn’t understand), where the answer is based on existing knowledge, would you have to cite in this case?
This might mean that you publicize your account name in your published paper at the cost of citing existing fundamental knowledge that was not clear to you at the time.
Also, these StackExchange websites are linked and it seems that not everyone would like that for privacy reasons. So how could this be managed appropriately.