So I solved my problem.
It turned out I did not actually need to use sudo with these commands.
What I did was to save the 2 commands (without sudo) in a bash script in my home folder. Then I gave it permissions to be executed by me and my group. Then, in elementary juno, I went to System Settings > Applications > Startup and clicked the + in bottom left to add the script.
This action creates a file in ~/.config/autostart/ with basic info that results in something very similar to my original screenshot, named Custom Command and with a stock icon. I was able to clean up the look by editing basic info in this file, like name, and adding an icon in ~/.local/share/icons/hicolor/128x128/apps/ called spacenavd.png.
To test is, I include sudo in front of both commands in the bash script, and execute it from terminal, then in terminal, I am prompted for a password.
But when I do not include sudo in front of either command in the script, and execute it from terminal, then this dialogue box pops in and prompts me to enter my password:
When I boot up and login, I am not given this dialogue, and I believe that's because I have just logged in.
Here is how it looks now:
Here is the spacenavd.sh file in my home folder
The permissions on the script
The dekstop file at ~/.config/autostart/ which I renamed spacenavd.desktop
And the spacenavd icon ~/.local/share/icons/hicolor/128x128/apps/spacenavd.png
The 3Dconnexion SpaceMouse Wireless 3D Mouse 2.4GHz via Micro-USB (3DX-700043)
My setup running on a model A1398 macbook pro 2012: