Was the suppression of rights during WWI a valid solution to protecting America?
It is ironic that during the "war to protect democracy" America went the other way and stifled freedoms that would be normal in peacetime. America passed another Sedition Law, making it illegal to speak out against the war. American postmasters looked in the mail for German words and letters going abroad. It was even illegal to organize work stoppages in war industries. Thousands went to jail for their opinions on the Allies or about the nature of war itself.
That being said, you cannot take the Sedition Laws and Anti-Espionage Laws out of context. In the decades leading up to the war, America was the prime location for immigrants from Europe. Irish immigrants hated Britain and wanted to see a German victory. Some German immigrants considered themselves German no matter where they went--there was even a small, yet visible German "Fifth Column" in America which succeeded in blowing up factories, most notably the Black Tom Munitions Plant in New Jersey. There were also socialists who said that this war was a war about greed and capitalism and they tried to organize strikes--this was the view taken by Socialist and presidential candidate Eugene V. Debs. Of course, there was still the fear of anarchists in the country whose assassination of Francis Ferdinand started the war in the first place. The American government was scared of all of these potential troublemakers and issued draconian laws to protect itself. America has done this in times of war such as when Adams drafted the Alien and Sedition Act in 1798 to chase potential French Revolutionaries away from America. The Wilson administration was able to use this as a precedent.