Fantastic advice, all your points resonate with me as I tried them.
In terms of social media, if it is used for a purpose, controlled, and disciplined manner, it can be useful for business purpose. I agree with the addictive aspect and negative implications on health.
I even identified some social media tools as a distraction for writers.
In terms of caffeine, you mentioned 4 hours before bed. From my experience at least 8 hours as caffeine has a long life span in the brain. Perhaps some people tolerate 4 hours but was not the case for me. Like yourself, my stomach can’t tolerate coffee and tea.