HR rep here. Technically, accidental texts don’t fall under misconduct unless they contain threats or discriminating content. Your best bet is to explain it was a mistake. If your boss is decent, they’ll understand and move on. Proactively address it though, leaving it to fester might actually worsen the situation.