Honesly, I’d say the second option is better, because it wouldn’t allow the user created script to be run as root without a password, left to it’s own devices.
@Grainbox If not a bash script you can also install xorg-xbacklight package to manage screen brightness with keyboard shortcuts as it will work with intel. Also see Backlight - ArchWiki
xbacklight -inc 10 #to increase by 10%
xbacklight -dec 10 #to decrease by 10%