That reminds me of a fairly well known anecdote from the Paris peace talks. An American general and a Vietnamese general were talking on the fringes of the main negotiations and the American general made pretty much exactly the same point you're making here - technical superiority, never losing a pitched battle, and so on. The Vietnamese general's reply? "That's true, but it's also irrelevant."
Clausewitz defined war as the art of imposing your will on an enemy through violence, by that standard there was only one winner in Vietnam. Agreed though that ascribing it to "Vietnamese farmers" is a hopelessly inaccurate if romantic stereotype, it was the regular military of North Vietnam that won the war.
Exactly. The US performed ably in situations where they can use what people call "third-generation warfare"--halting and then reversing the Tet Offensive with a high kill-death ratio and obliterating Northern Vietnamese industry and supply lines from Linebacker and Arc Light, for instance. Vo Nguyen Giap and Ho Chi Minh were brilliant men, however, and they were able to wage guerrilla campaigns in a manner that constantly denied the US and friends from leveraging their technological superiority and experience in pitched battles (as you said), despite horrendous losses (including the near destruction of the Viet Cong later in the Tet Offensive), which eventually sapped the political will of the US-SEATO nations, undermined support for the South Vietnamese military junta, and thereafter sown the seeds for Vietnamization and the fall of Saigon--thus, the US' victories in the battlefield were rendered moot, and they were ultimately forced to withdraw from Southeast Asia, writing off the Vietnam War as their defeat.
Make no mistake: I am well aware that the US only "won" Vietnam in terms of semantics and technicalities, that Vietnam ultimately proved the victor due to their ultimately achieving their geopolitical goals (withdrawal of the US from mainland SEA and reunification of Vietnam), and that focusing merely on battlefield victories, especially in wars mostly defined by asymmetrical warfare and counterinsurgency, is shortsighted and ridiculously biased. It's just that going completely the other way around--that is, making an overgeneralized statement about the conduct of a war belligerent, as opposed to focusing completely on one aspect of such conduct to the detriment of the "whole picture"--is, I believe, an equally-wrong approach, and is more-or-less "bad history."