The pertinent part of my .htaccess looks like this:
Options -Indexes Order allow,deny Deny from all Re
This one works as expected for all files/dirs with name started by dot even in subdirectories:
Order allow,deny Deny from all Satisfy All RedirectMatch 404 \/\..+$