I think you don't need to build dwm youself and write a special script which setup xinput properties. You can just use Xorg configuration file instead
Create a file /etc/X11/xorg.conf.d/30-touchpad.conf
that contains this:
Section "InputClass"
Identifier "touchpad catchall"
Driver "libinput"
Option "Tapping" "on"
EndSection