If you customize document library to keep actions like "Download" and "Edit Properties" hidden from users, everything works when you are listing documents in document library and even when you look at the node details page.
But the Download button, present in the right superior corder of the form is still there, even if the action inside the Actions panel is not.
The same is true for the Edit Properties action. The action inside the Actions panel is not present, but the "Pencil icon" allows users to access that action, when they shouldn't.
It's always required to configure the actions using share-custom-config.xml AND customize the webscript for not rendering those options.
If you ask me for my opinion, I would simply remove those buttons/actions, and let only the actions inside the Actions panel.