The fiscal policy wreck that has been threatened for Thursday midnight has been rolling down the tracks for more than four years.

The impasse over federal deficits -- and legislation requiring a balanced budget -- is no accident; it is the result of political decisions by President Reagan, Senate Republicans and House Democrats that have locked both parties on a collision course.

Even if the collision is delayed past next week's U.S.-Soviet summit in Geneva by a last-minute, short-term increase in the the government's borrowing power, administration and congressional officials see no escape from the dilemma created by past actions and opposing political imperatives.

"We're in the fifth year of this impasse," said Rep. Willis D. Gradison Jr. (R-Ohio), one of the frustrated conferees on the budget. "We've run out of rational solutions."

Members of Congress and students of the institution suggest that while compromise has seemed tantalizingly close several times this year, there are serious structural barriers, strongly felt political antagonisms and genuine philosophical divisions between the executive and legislative branches and between the two parties in Congress that persistently foreclose a solution to the problem of inflated deficits.

In the summer of 1981, bipartisan majorities approved the package of deep tax cuts, massive defense increases and limited domestic-spending restraints pressed by the newly elected president -- a policy combination that was described by then-Senate Majority Leader Howard H. Baker Jr. (R-Tenn.) as "a riverboat gamble."

When the recession hit in the fall of 1981 and the deficit started to soar, the consensus crumbled and members of both parties scrambled to hedge their bets.

In 1982, the Democrats warned voters that rising deficits would give the Republicans an excuse to cut Social Security, and they won many House elections on that issue.

In 1984, the Republicans warned that the same deficits would impel the Democrats to raise taxes. When Democratic presidential nominee Walter F. Mondale confirmed that, if elected, he intended to raise taxes, Reagan used the issue to help demolish him.

Coming into 1985, the White House was determined to avoid the blame for tampering with Social Security and House Democrats were desperate to dodge the label of being tax-boosters. Reagan also fought doggedly -- and ultimately unsuccessfully -- to protect his defense buildup. And domestic interest groups found Congress receptive to pleas to spare politically sensitive spending programs -- from farm subsidies to student loans.

A bipartisan Senate group came up with a plan that would have spread the pain four ways -- hitting Social Security, defense, domestic spending and taxes -- but both Reagan and the House Democratic leadership balked. The summer budget settlement left almost everyone dissatisfied with the degree of deficit reduction that had been achieved.

That might have been the end of it for 1985, had it not been for the need to raise the debt-ceiling above the symbolically significant level of $2 trillion. With two-thirds of the voters in The Washington Post-ABC News poll saying that the deficit is the first or second most important problem facing the nation, legislators of both parties looked for a way to sugarcoat the bad-news headlines about the $2 trillion debt.

The vehicle was the Republican-inspired Gramm-Rudman-Hollings "automatic" deficit-reduction process, passed in different forms by the Senate and House and now mired in controversy over deadlines, procedures and exemptions.

At heart, however, it is not a debate over timetables and processes but an impasse over deep policy and political differences. "What we have," said congressional scholar Steven Schier of Carleton College in Minnesota, "is a political failing, and no structural redesign will cure it."

The frustration in Congress has produced an orgy of finger pointing. "The House Democrats don't want this crisis resolved," Senate Budget Committee Chairman Pete V. Domenici (R-N.M.) charged yesterday. "Their bill [the House version of Gramm-Rudman-Hollings] is a joke."

Replied Rep. Vic Fazio (D-Calif.), a House conferee: "It's the president's unwillingness even to talk about the revenue side of the equation that has made the process of give and take impossible."

Privately, some Republcan senators criticize the White House and some Democratic House members fault their leadership for being stiff-necked. They see missed chances for agreement: At the meeting last summer when Reagan, about to enter the hospital for cancer surgery, snapped a pencil in irritation and announced that he would not back down one inch in his opposition to tax increases; at the closed-door July meeting when House Democratic leaders decided that any compromise on capping Social Security inflation increases would jeopardize their chances of winning a crucial Texas special election.

But most observers agree with political scientist Aaron Wildavsky, the University of California-Berkeley expert on the budget process, who said, "There are deep philosophical differences, not just minor matters" that block agreement.

The 1984 election did not resolve the differences because, as James Thurber of American University's political science department put it, "there were no coattails." Reagan, vowing to block a tax increase, won overwhelmingly, but so did almost all congressional incumbents of both parties. Many of them promised their constituency interest groups to spare them from painful cuts.

Schier, who has conducted extensive interviews among Budget Committee members of both parties, said, "The primary occupational goal of these people is to avoid or postpone electoral costs . . . . They won't put a gun to their head and kill themselves."

Congress is responsive to public opinion, but the public is of little help on budget issues. While large majorities rate the deficit as a top problem, there is only one spending category where more than 50 percent of those surveyed by The Washington Post-ABC News say they favor "substantial cuts." That is military spending -- the area Reagan is most determined to protect. Only 38 percent would cut domestic spending substantially. Only 24 percent would increase taxes. And only 5 percent would reduce Social Security.

Until those numbers change, the politicians in Washington will continue to twist and turn.