Americans are rightly outraged by the stupid, profit-oriented decision of Toshiba Machine Co., along with a Norwegian arms firm, to make an illegal sale of sophisticated military technology to the Soviet Union.

But it was equally stupid and downright juvenile for three Republican members of Congress, on the Capitol grounds, to sledgehammer a radio made by the parent Toshiba electronics firm. This useless and undignified response has given the Japanese a convenient way to duck the real issues involved.

A video clip of the July 1 radio-bashing is played by Japanese TV three or four times a day, whipping up anti-American sentiment, according to former assistant secretary of Commerce Clyde Prestowitz, now lecturing in Japan.

"What bothers me most," Prestowitz said in a telephone conversation from Tokyo, "is that there is much debate here trying to prove that the Toshiba Machine sale of milling equipment had nothing to do with reducing the noise of Soviet submarines. The whole discussion here is how to take sufficient measures to tamp down the American complaints. There is no recognition that stopping such sales is crucial to their own security."

The main worry in Tokyo seems to be that Congress will ban the sale of Toshiba products in the United States.

Despite the forthright response of Prime Minister Yasuhiro Nakasone condemning the Toshiba subsidiary, the Japanese public, stimulated by the media, is still defensive. And there is a rising crescendo of anti-American sentiment, exacerbated by the coincidental Senate passage of trade legislation viewed -- correctly -- as anti-Japanese.

The Japanese press, meanwhile, openly suggests that the "real" purpose of the attack on Toshiba is to sabotage successful Japanese high-tech companies that have been getting the best of their American competitors. It is safe to assume that the press is fed this line by government bureaucrats.

According to this diabolical-plot theory, the first victim was Hitachi, accused of an elaborate semiconductor dumping scheme. Next, they say, Commerce Secretary Malcolm Baldrige zapped Fujitsu's plan to buy Fairchild Semiconductors. Now, there's Toshiba and, as Prestowitz observes, "The papers here ask: 'Who's next?' It's the lead story every day."

Thus, the two biggest noncommunist powers, who should have the greatest interest in cooperation and joint efforts on economic and strategic issues, are stumbling into a critically tense point in their relations.

Japan has failed to take seriously the efforts of Cocom -- an international supervisory body -- to limit exports of high-tech equipment to communist countries. This complicates the efforts of the Reagan administration and free-trade supporters to weaken protectionist legislation.

The situation is not helped by the fact that both Nakasone and Reagan are lame ducks. In Japan, no one is clearly in line to take over when Nakasone steps down in the fall. "And," says Japanologist George Packard, head of the Reischauer Institute at the Johns Hopkins School for Advanced International Studies here, "they aren't taking us very seriously. They see Reagan fatally wounded by the Iran-contra scandal, and unable to do anything about the American budget deficit."

But mounting an American-bashing campaign in response to American anger about a security breach by Toshiba Machine Co. is a no-win strategy. It feeds the impression that many Americans already have that the over-arching Japanese priority is to make money -- and that such things as the Western bloc's security, despite huge sums committed to that purpose by the United States, mean little.

It should be obvious to our Japanese friends that one of the main elements in the American budget deficit they complain about is a huge expenditure to defend the Western world, including Japan.

What the Toshiba subsidiary and its Norwegian partner did was wrong. The companies should be severely punished by Japan and Norway, rather than by the U.S. Congress. The Norwegian company, fortunately for it, doesn't sell consumer products here. For a time, some Americans may avoid the Toshiba label. That can't be avoided. But if Japan pursues the matter, and keeps a closer eye on other companies' export practices, the issue will fade.

The crucial point was made in a public speech last week by Treasury Assistant Secretary David Mulford: Japan must understand that many recent events have eroded the support of its friends in this country. These friends acknowledge that the bulk of the American trade deficit can be traced to failures of American government policy and to American management and labor practices.

Nonetheless, Japan's failures to match action with its rhetoric relating to trade and capital-market opening are an irritant. For example, Treasury officials now believe that the latest Japanese fiscal package, for which Nakasone won plaudits at the Venice summit when he said it would add 1 1/2 percent to Japanese GNP, looks as if it will be only in the one-half to 1 percent range.

If Japan's supporters in the U.S. Treasury and elsewhere begin to conclude that Japan's word can not be trusted, we face an increasingly serious situation.