As the House Ways and Means Committee etched the final lines yesterday in its gargantuan bill to overhaul the federal tax system, the fight for the hearts and minds of American taxpayers was well under way.

Rachelle Bernstein, a lobbyist for the U.S. Chamber of Commerce, stepped before an NBC television camera and warned that proposals in the bill to increase taxes on business investment would "cause a slowdown in economic growth."

Standing within earshot was an assistant to Beneficial Corp. Chairman Finn M.W. Caspersen who was working Capitol Hill for the bill. He instantly plotted a countermove: "We're going to get Caspersen on NBC, too."

The scene was only the public tip of an iceberg of corporate opposition to the Ways and Means bill. A range of business lobbyists fighting the measure said yesterday that they gave up weeks ago on efforts to block the legislation in committee and are instead trying to wire booby traps for it in the bureaucracy, the White House and elsewhere in Congress.

Hot on their trail is a smaller but well-organized coalition -- ranging in size from IBM and General Motors to independent grocers -- that backs the bill largely because it would reduce corporate tax rates.

In this lobbying version of cat-and-mouse, the fate of a bill can change while almost no one is looking.

The lobbying energies of both sides began to shift last week to the House Rules Committee, which is to vote early next month on rules for debate on the House floor. A rule loosely limiting debate could effectively kill the measure.

Not surprisingly, the rules-related scenarios for stopping -- and "greasing" -- the bill are elaborate. One strategist in the camp of corporations opposed to the tax-overhaul bill laid out these options:

"We could try a motion from the House floor to defeat the rule. It's a long shot, but it would give uneasy House members a way of saying 'I didn't vote against reform, I voted against a bad rule.'

"Or we could try a motion to recommit the bill from the House floor to the committee. Ways and Means Chairman Dan Rostenkowski could save face then by just holding the bill in his committee. And some people think the ideal tactic would be delaying until 1986.

"Personally, I don't think any of those will work. Tip House Speaker Thomas P. (Tip) O'Neill Jr. wants the bill; he'll grease the Rules Committee and there'll be no stopping it."

Another focus of lobbying is President Reagan. The Chamber of Commerce, the National Association of Manufacturers and the Business Roundtable -- the nation's largest business coalitions -- will soon inform him privately of their opposition to the bill, according to officials of these groups. Not to be outdone, Caspersen and others supporting the bill have requested time with Reagan to push for an endorsement.

The thinking of both sides is that many House members will back away from the bill on the floor unless the president gives it his seal of approval.

The decision of the three large business groups to oppose the measure marks a major shift. Throughout the year, they have withheld judgment on tax overhaul, because of deep schisms among their members. But sources said the members disproportionately oppose the Ways and Means bill.

The three groups plan a rally with officials of several hundred corporations and prominent members of Congress who oppose the measure. It is scheduled for just about the time the Rules Committee will be gaveled into session.