For content staging, it's not granular enough to not sync the visibility macros.
In relation to your macro, I can't help thinking there's a better way to do what you're doing. Applying visibility based on the parent document name/id seems a bit restricting. Is there no category you could assign to the current page instead, or another indicator on the page (Page Type property for example)?
Failing that - you could probably do a comparison of both the DocumentNamePath and the CurrentDocument.DocumentNode.NodeLevel, which would allow you to at least stop it resolving to true for child documents. And that property should be cached (I think).