Addressing the statement about entrenchment specifically, though; I wanted to offer this, from McPherson's
Battle Cry of Freedom:
Grant’s objective was a dusty crossroads named Cold Harbor near the Gaines’ Mill battlefield of 1862. Sheridan’s cavalry seized the junction after an intense fight on May 31 with southern horsemen commanded by Lee’s nephew Fitzhugh Lee. Next day Sheridan’s troopers held on against an infantry counterattack until Union infantry came up and pushed the rebels back. During the night of June 1– 2 the remainder of both armies arrived and entrenched lines facing each other for seven miles from the Totopotomy to the Chickahominy. To match additional southern reinforcements from south of the James, Grant pried one of Butler’s corps from the same sector. At Cold Harbor, 59,000 Confederates confronted 109,000 Federals. Both armies had thus built themselves back up almost to the numbers with which they started the campaign four long weeks earlier.
These four weeks had been exhausting as well as bloody beyond all precedent. The Federals had suffered some 44,000 casualties, the Confederates about 25,000.[SUP]25[/SUP] This was a new kind of relentless, ceaseless warfare. These two armies had previously fought several big set-piece battles followed by the retreat of one or the other behind the nearest river, after which both sides rested and recuperated before going at it again. Since the beginning of this campaign, however, the armies had never been out of contact with each other. Some kind of fighting along with a great deal of marching and digging took place almost every day and a good many nights as well. Mental and physical exhaustion began to take a toll; officers and men suffered what in later wars would be called shell shock. Two of Lee’s unwounded corps commanders, A. P. Hill and Richard Ewell, broke down for a time during the campaign, and Ewell had to be replaced by Jubal Early. Lee fell sick for a week. On the Union side an officer noted that in three weeks men “had grown thin and haggard. The experience of those twenty days seemed to have added twenty years to their age.” “Many a man,” wrote Captain Oliver Wendell Holmes, Jr., “has gone crazy since this campaign began from the terrible pressure on mind & body.”[SUP] 26[/SUP]
All of this was on Grant’s mind as he pondered his next move. Another flanking maneuver to the left would entangle his army in the Chickahominy bottomlands where McClellan had come to grief. And it would only drive Lee back into the Richmond defenses, which had been so strengthened during the past two years that the usual defensive advantage of fieldworks would be doubled. Another dozen Union regiments were scheduled to leave the army when their time expired in July; this factor also argued against postponement of a showdown battle. Grant’s purpose was not a war of attrition—though numerous historians have mislabeled it thus. From the outset he had tried to maneuver Lee into open-field combat, where Union superiority in numbers and firepower could cripple the enemy. It was Lee who turned it into a war of attrition by skillfully matching Grant’s moves and confronting him with an entrenched defense at every turn. Although it galled Lee to yield the initiative to an opponent , his defensive strategy exacted two enemy casualties for every one of his own. This was a rate of attrition that might stun northern voters into denying Lincoln re-election and ending the war. To avoid such a consequence Grant had vowed to fight it out on this line if it took all summer. “This line” had now become Cold Harbor, and the results of a successful attack there might win the war. If beaten, the Confederates would be driven back on the Chickahominy and perhaps annihilated. Grant knew that the rebels were tired and hungry; so were his own men, but he believed that they had the edge in morale. “Lee’s army is really whipped,” he had written to Halleck a few days earlier. “The prisoners we now take show it, and the action of his army shows it unmistakably. A battle with them outside of intrenchments cannot be had . Our men feel that they have gained the morale over the enemy and attack with confidence.”[SUP] 27[/SUP] So Grant ordered an assault at dawn on June 3.
The outcome revealed his mistake in two crucial respects . Lee’s army was not whipped, nor did Grant’s men attack with confidence. Indeed, hundreds of them pinned slips of paper with name and address on their uniforms so their bodies could be identified after the battle. At dawn came the straight -ahead assault delivered primarily by three corps on the left and center of the Union line. A sheet of flame greeted the blue uniforms with names pinned on them. The rebels fought from trenches described by a newspaper reporter as “intricate, zig-zagged lines within lines, lines protecting flanks of lines, lines built to enfilade opposing lines . . . works within works and works without works.”[SUP] 28[/SUP] Although a few regiments in Hancock’s 2nd Corps— the same that had breached the Angle at Spotsylvania— managed to penetrate the first line of trenches, they were quickly driven out at the cost of eight colonels and 2,500 other casualties. Elsewhere along the front the result was worse— indeed it was the most shattering Union repulse since the stone wall below Marye’s Heights at Fredericksburg. The Yankees suffered 7,000 casualties this day; the Confederates fewer than 1,500. By early afternoon Grant admitted defeat and called off further efforts. “I regret this assault more than any one I have ever ordered,” he said that evening. “I think Grant has had his eyes opened,” Meade wrote dryly to his wife, “and is willing to admit now that Virginia and Lee’s army is not Tennessee and Bragg’s army.”[SUP] 29[/SUP]
McPherson, James M. (1988-02-25). Battle Cry of Freedom: The Civil War Era (Oxford History of the United States) (pp. 733-734). Oxford University Press. Kindle Edition.