Does WhatsApp duplicate files when I share them with different contacts
Only the developer of the iOS client app can answer this. Basically, the answer depends on how the WhatsApp iOS client manage the files locally.
The most reasonable approach would be to avoid duplication by using some kind of mechanism to identify a media file's identify and maintain a single on-disk copy.
While this could be attested to based on empirical evidence, only the actual developer of the app can give an affirmative answer to this.