Is it safe to resell my gaming console?

Is
- in Xbox
1

Our "XBox one X" will soon be replaced by the new box, but of course we don't want to throw the "old" fully functional box in the trash for several reasons. Therefore my question:

Can a potential buyer get passwords etc. When he gets our XBox reset to factory settings? Can Microsoft recognize from the hardware that there's a new owner and cause problems there?

si

I also sold my Xbox One X console because, like the lockdown, the new console was not available, so I sold it privately. In response to your question, no is not possible because I have to reconfigure every console that I have reset to factory settings and even there everything is really deleted. Then I reset it a second time to the factory settings and then it is handed over to me to buy it.