nervousball
Hello, have you tried turning on Advanced Chat Privacy on? In each chat/group, if you tap the name of the person/group, then scroll down, you can tap Advanced Chat Privacy and turn it on. This will prevent the media in the chat from being automatically downloaded to your gallery.
Bear in mind, if you activate this setting in a group chat it will be turned on for everyone else in the group as well. Also, you either need to be the group admin, or the person who set up the group needs to have allowed those settings to be modified by anyone else in the group.