Any sheriff who, either negligently or willfully, or by want of proper diligence, firmness, and promptness in the use of all the powers with which the sheriff is vested by law, allows a prisoner to be taken from the jail of the sheriff’s county, or to be taken from the sheriff’s custody, and put to death by violence, commits a Class A misdemeanor in office, and, upon indictment therefor and conviction thereof, shall be fined at the discretion of the court, and shall also, by the judgment of the court, forfeit the office, and be declared forever incapable of holding any office of trust or profit in this state.