It is a Class 5 felony for a person to knowingly and intentionally communicate any verbal, written, or electronic threat to take the life of or to inflict serious bodily harm upon an elected officer, or the immediate family of an elected officer. The threat must relate to the elected officer's official capacity. For the purposes of this section, the term "elected officer" means: (1) Any person holding statewide office as defined in § 12-27-1; (2) Any current or former judicial officer as defined in § 22-11-14; (3) Any member of the Legislature; (4) Any person in local government elective office; (5) Any school board member; and (6) Any person who has been elected or appointed to the elective office who has not yet assumed office. If a threat constitutes a violation of § 22-11-4 or 22-18-1.1, the provisions of this section are superseded, and the penalties provided in § 22-11-4 or 22-18-1.1 apply.