I also have a 5-year old, we've given him an iPad that doesn't allow software to be installed via the app store; doesn't allow any websites to be visited and has a screentime set to an hour a day. If he wants something on the iPad we have to unlock the parent settings and install the specific app they want on it. The iPad has iMessage/iPhoto/Music and everything else turned off. Most of the time he plays angry birds for a an hour or plays the piano on it or some other innocent activity.
As far as giving him a smartphone; both my wife and I have agreed not until he's 16 and no social media until he's 18. We may give him a kids phone when he's older that only allows phone calls to a locked set of people and has no apps on it.
I'm not too concerned about what his peers have or do; him feeling left out is a small price to pay for not having to endure the problems associated with social media.