Probably nowhere was the death three months ago of Albanian leader Enver Hoxha analyzed more carefully than here in Yugoslavia, a country whose own stability could be affected directly by the policies of Europe's most secretive state.

Stalinist Albania has long figured in many of the "worst case scenarios" dreamed up by people whose job it is to ponder the future of the Balkans, the one-time tinderbox of Europe. If the tiny mountainous state on the Mediterranean was ever to revert to Soviet tutelage, it could spell grave problems for neighboring Yugoslavia with its politically restless ethnic Albanian minority.

It was therefore with rapt attention, as well as amusement, that a professional Yugoslav Albania-watcher recently listened to an Albanian official describing the plot of the American television series "Dynasty" in intricate detail. It turned out that, for all his militant Marxist-Leninist rhetoric, the official was an avid fan of the capitalist soap opera, which is broadcast in English by Yugoslav television and can be picked up easily in the Albanian capital, Tirana.

A minor incident perhaps, but it is a revealing glimpse of how Albania is gradually -- very gradually -- emerging from four decades of self-imposed isolation. Just a few years ago, watching foreign television stations was strictly forbidden in Albania, as were other symbols of "decadent" western influence such as long hair, Bibles, and private automobiles.

In the Yugoslav analysis, Albania's new leaders now find themselves at a historic crossroad. A growing economic crisis and the wish to alleviate the hardships of everyday life for the country's 2.5 million inhabitants argue in favor of opening the country to the outside world. But Hoxha's political heritage, a fierce sense of Albanian nationalism and divisions within the leadership make rapid change risky and unlikely.

Both western diplomats and Yugoslav analysts here agree that Hoxha's handpicked successor, Ramiz Alia, 59, is still consolidating his political power after his appointment as first secretary of the communist Albanian Party of Labor last April. As a northern Albanian of Moslem origin, a Gheg, he has to tread particularly carefully in a leadership dominated by Tosks, the southerners.

"If Alia feels at all insecure, he will probably continue with present policies, even though the economic situation is difficult," a Yugoslav official said. "Once he has settled down, and has placed his own men in important positions, then perhaps there will be some changes."

Last week Albania published posthumously some statements on foreign policy by Hoxha expressing opposition to entangling political and commercial ties to countries with alien ideologies. Western analysts saw this restatement as ruling out any quick change.

Albania's present economic problems have been compounded by its break with China in the late 1970s, which left it without a protector and patron for the first time in more than four decades. Hoxha, a French-educated schoolteacher who led an uprising against Italian occupation in World War II, had broken off alliances with Yugoslavia in 1948 and the Soviet Union in 1962.

The few western visitors allowed into Albania have a sense of being whisked back into the 19th century. Agricultural techniques are primitive. With the exception of a gigantic steel plant in the central town of Elbasan, constructed with Chinese help, many factories seem to western eyes as if they could be relics from the early stages of the Industrial Revolution.

Deprived of Chinese or Soviet assistance, the only method open to Albania of modernizing its aging industrial facilities is by stepping up its foreign trade. The taking of credits is forbidden under the Albanian constitution, so all trade has had to be conducted on a barter basis.

According to Yugoslav statistics, Albania's total foreign trade turnover now amounts to a scant $800 million a year. Albania exports chrome [it is said to be the fourth-largest producer of chrome in the world], electricity, and some oil, in return for a wide variety of goods that it cannot produce itself, including machine tools and industrial plants.

"Their economic difficulties seem to be growing," a Yugoslav official said. "You find more and more criticisms of shortages in the official press. It's obvious that the Albanian leadership is preoccupied with internal problems."

Like the United States, Yugoslavia has a clear strategic interest in preventing the Soviet Union from gaining access to Albania's warm-water ports in the Adriatic, off the Mediterranean. On this point, they were encouraged by Alia's decision to reject brusquely a message of condolence from the Soviet leadership after Hoxha's death -- an obvious overture toward Albania by the Kremlin.

Yugoslav leaders also are concerned, however, about what they see as Tirana's propensity for stirring up mischief among the 1 million ethnic Albanians in Kosovo, a Yugoslav province just across the border from Albania.

The political climate in Kosovo is still tense following serious rioting in 1981, when Albanian demonstrators demanded that the province be upgraded to the status of a federal republic. In the view of many politicians in Belgrade, this would amount to the first step in dismembering Yugoslavia as a multinational state. The delicate ethnic balance already is being threatened by the mass exodus of Serbs from Kosovo because of Albanian threats and population pressures.

Ironically, Albania's economic backwardness and the harsh nature of its regime could be seen as serving Yugoslav interests in the short term, in the view of some observers. Although many Yugoslav Albanians look to Albania as their mother country, they also are aware that the living standards just across the border are well below their own.

After encouraging cultural ties between Albania and Kosovo in the 1970s, Yugoslav officials are now extremely sensitive to what they regard as Tirana's "interference" in the region. Talks on a new cultural exchange agreement were suspended last November, with Yugoslavia charging that Albania was refusing to recognize the rights of its Yugoslav minorities.

The first railway link between Albania and the rest of Europe will be inaugurated later this year after work is completed on a line linking Titograd, Yugoslavia, and Shkoder in northern Albania. But the Albanians have given a clear signal that this will not mean a sudden opening up to the outside world.

When the Yugoslav side suggested regular passenger train service between the two countries recently, the idea was vetoed by Albania. For the time being at least, trains traveling between Shkoder and Titograd will carry cargoes of chrome -- not people.