Hell, what isn’t illegal nowadays... but yes you’re correct, it is illegal to delete emissions equipment. It’s technically not illegal to tune, unless that tune turns off emissions equipment which on a diesel or does. Lol
There have been crack downs of late, H+S tuners got taped pretty hard 2-3 years ago, quadzilla, and Sinister diesel. Recently Diablo got popped but that was more for their gas engine tuners.
Small places like HPP, PPEI (who I would recommend to you with with a ‘max, Kory Willis is the man on duramax tuning) they’re harder to go after since they have a huge presence in the racing world also.
Just check the box that says yes I know it’s for ‘off-road and racinguse only’ and move on to a much better running, happier,, longer lasting truck.