Machine prints out paper ballot, properly inscribed with the selected vote so that there’s no “ooh, but there’s a smudge here that might mean a vote for X”. It could also print out a 3D barcode that contains metadata such as time, place, machine, checksums, etc
Human who voted can verify the correct box is selected etc.
Vote slip goes into second machine where it’s counted (or a box for later counts)
Paper vote slips are maintained for recount/validation purposes
IMO there’s nothing wrong with both.