This is already happening if you want to visit the US. Customs officers will look at your social media accounts to make sure you are compliant.
(for example: https://www.dw.com/en/eu-weighs-giving-us-data-for-fewer-tra...)
The truth is that 'foreigner' is a term invented by states to create a distinction where there is mostly no difference. I have more in common with a normal citizen from elsewhere than I do with Elon Musk or Jeff Bezos.