I'm not saying that using a script to modify sudoers is safer than modifying it by hand.
Then why do you keep presenting arguments to everything I say? It's not like I haven't made it clear what my position is. If you aren't arguing against what I'm saying then what are you doing?
Because it doesn't matter that much how you modify sudoers. What matters is how many programs do you run as root and in which locations they reside. Yes, a script which fiddles with sudoers is one more entry point, but there are enough equally good entry points for malicious code which are readily available. Consider this:
1. I use a script which modifies sudoers. Someone compromises it (by stuffing code to its appdata folder for example), and the next time I run it, bad stuff happens on my pandora.
2. You use some other PND which requires root access (SGX driver installer, Java installer, Claws mail, aircrack-ng, partition editor, C dev tools, you name it). Someone compromises it in exactly the same way, and the next time you run it, bad stuff happens to your pandora.
Frankly as an intruder I'd rather target some popular PND with thousands of downloads. And once I get root access, I would definitely remove all traces leading to my entry point.
Remember that metaphor of key vs. key cloning machine? My argument is that those are exactly the same in terms of security.
Doing all the steps manually may be more error prone but it's still strictly safer than trusting that your script hasn't been compromised.
Is it strictly safer than trusting that sudo hasn't been compromised?
You mean visudo? That's what you use to modify the sudoers file.