I think you have two general categories of problems to think about. Let's call them on-chain and off-chain, for now. There might be a better classification.
With care, yes, you can obfuscate the votes with a commit/reveal pattern so no one can know what the votes are until all the votes are collected. That won't even hide who voted unless you go to a lot more trouble to hide the msg.sender
. That, in itself, might be too much information leakage - something to think about.
Off-chain, it will be harder to prevent the five voters from holding meetings and deciding what to do in smaller groups or all together. It raises some questions, such as (top of mind list):
- Do they know who they are? If not, how do we know they can't find each other?
- How serious of a problem is it if they coordinate their votes?
- What are the incentives to work together?
In a case where there is a strong incentive to collude, you might have to set up strong counter-incentives to detect and punish certain kinds of behaviour. A contract will not easily know if a vote is cast by someone acting alone and in good faith, or cast by someone who has participated in the sort of collusion you don't want to exist.
The Augor project has been working on collusion-resistant incentives for several years and they have published multiple papers about their approach to solving it. Possibly some good information for you in their writings.
Hope it helps.