yes, sex is good for you. People used to have much more sex than we do today and the decline in it is not good for the population. Even in early modern european times when people often delayed their marriages until their 30's like today, prostitution was readily available and had no legal issues surrounding it.
Sex and touching releases oxytocin, which is a bonding chemical associated with feeling connected basically. It also focuses the people involved on relationship dynamics related to childbirth which gives them a higher purpose since most people are listless without biology giving them a goal. What is happening in developed countries is absolutely unprecedented and quite bad. Pornography is a poor replacement since it only reinforces screen addiction and does not release oxytocin or involve social bonding.
People laugh when they say it's a human right, but it is a strong human need comparable to drinking water or living in packs. Nearly all of the spreekillers of this decade are people who went ballistic because their physical needs were going unmet during the height of puberty and then acted out because they knew they were never going to satisfy that need