AFAIK, the “ifModule” wrappers are primarily used for code that is going to be used in unknown environments.
For example, WordPress has “if” because it is used by many and it can not be predetermined how a users set up will be.
And I suppose it might be good to have if you are going to use it inside VM environments that could be configured differently.
One thing to keep in mind is that “ifs” will cause a “check” every time the file is processed (every time an HTTP Request is made to the folder the htaccess file is in). So for efficiency it is likely better to not have ifModule wrapped around modules you know do exist.
Only that unless you wouldn’t mind if someone other than you might see the information it would be better to not leave the file there. I don’t know how useful the info might be to a hacker, but I prefer to not take unnecessary chances.