This is the classic ‘out of context’ problem as seen in the Spanish invasion of Central America. The culture there had survived for thousands of years which means they had a stable form of governance. However, when the Spanish arrived, they had no context to refer to. As a result, the culture was destroyed virtually overnight. This has happened over and over again.
Strangely, we don’t necessarily have to go to war with them: simply the presence of an advanced race is enough. Of course, the Spanish, as well as other European countries, had no trouble adding violence to the mix.
The US has a law that says ‘if we are contacted by aliens via electromagnetic waves (as opposed to their dropping in on us in the flesh), that no one may reply to their message. The reason? The communication might be a test to see if we’re advanced enough to receive and decode the messages. By replying, that may signal to the aliens that we are a potential threat and we might get wiped out.
Both Star Trek and Babylon 5 had berserker story lines. The first in-print reference I am aware of is Fred Saberhagen’s Berserker novels.