Putting the codes exactly as you have in the .htaccess file located at:
/home/user/subdom/public_html/.htaccess
redirects www to non-www for
subdomain.example.com

If you put a second condition in that same .htaccess file to handle the www to non-www redirect for the sub.subdomains -- it creates an infinite loop

Remove the second condition from the root .htaccess file and place it instead inside the .htaccess file for the sub.subdomain at:
/home/user/subdom/public_html/sub1/.htaccess
does make the redirect from www to non-www work for
sub1.subdomain.example.com

BUT breaks the redirect for www to non-www of
subdomain.example.com
which uses the .htaccess file at:
/home/user/subdom/public_html/.htaccess