New legislation introduced Friday by three Democratic senators purportedly aimed at holding social media companies accountable for harassment and discrimination on their platforms could have dire consequences unforeseen by the bill’s authors, experts said.