Election and voting security is a phenomenally difficult problem space. Much harder than it seems at first.
The National Academies wrote a report not long ago that gives a nice overview, has lots of detail, and makes specific policy recommendations to Congress: https://www.carnegie.org/media/filer_public/34/9d/349d3207-d...