If you timed an arrest to affect an election, regardless of who it is, then you would have an apparent violation of the Hatch Act. See 5 U.S.C. § 7323(1) (Executive branch employee prohibited from "us[ing] his official authority or influence for the purpose of interfering with or affecting the result of an election."). The decision to prosecute, and the decision of WHEN to unseal, arrest, etc., is an official act.