You do make a valid point about Obi-wan but don’t you think the same theory should also apply to Luke? He too knows Anakin’s history. He also struggled with the pull towards the dark side. He know how dangerous relationships are. Don’t you think he would have thought twice before getting involved with anyone? Having found out about Anakin and Padme?
Personally i’d prefer he had stayed virginal. Another point is that Luke had taken upon himself to reestablish the Jedi order and its teachings. How could he have done that if he would have violated one of its prime teachings and got involved with someone? I don’t see that happening unless he had somehow decided his new Jedis wouldn’t have to follow celibate. But i highly doubt that. He wasn’t creating his new personal order of Jedis but was rising from the ashes an already established order. Had he done otherwise he would have been quite a hypocrite. Unless that is the reason Ben Solo rebelled. Cuz he realized his uncle wasn’t practicing what he was preaching. :)