The position of Poland's Communist Party leader, Stanislaw Kania, has been strengthened considerably as a result of the first free election campaign here since World War II.

A campaign to choose about 2,000 delegates for an extraordinary party congress next month wound up here today with the election of Stefan Olszowski, who is widely regarded as one of the hard-liners in the ruling Politburo. But, despite Kania's personal backing, Olszowski received the votes of only 246 out of 440 delegates to a regional conference in Warsaw.

Olszowski's election means tht most, but not all, of the present Polish leadership will be able to attend the congress as delegates when it opens on July 14. They will then face a second major hurdle, since it is up to the congress to elect an entirely new Central Committee and Politburo.

In the past, the selection of delegates was made by the ruling elite and then endorsed by rank-and-file party members. This time, however, nearly 3 million ordinary party members have been able to vote for delegates by secret ballot.

An analysis of the results of elections for delegates to the congress shows that the major upset has taken place not at the top of the party, but at the next rung down. An estimated 80 percent of the present 250-man Central Committee were not elected to the congress, and therefore face political obscurity.

Under Communist practice, it is the Central Committee's task to act as a kind of policy-making body or parliament between party congresses which, in normal times, are held every five years. The Politburo and Secretariat act as an executive.

An even more remarkable turnover has taken place in the party's regional power structure. Of 49 regional party secretaries elected in the course of the current election campaign, only three held office at the time of the last regular Communist Party congress in February of last year.

What all this means is that, despite the appearance of continuity at the top, the Polish Communist Party has undergone what is probably the most profound shakeup in its stormy postwar history. Most of the politicians promoted by the former Communist Party chief, Edward Gierek, as a reward for their personal loyalty have been replaced.

Because of the changed nature of the election campaign, it is inaccurate to describe the new men as "Kania loyalists" in the old sense of owing their careers to him. But it does seem that a significant majority regard him as the leader best qualified to unite the party at a time of crisis.

Kania's authority has also been bolstered enormously by what was generally regarded here as a Soviet-inspired attempt to get rid of him earlier this month. Rank-and-file party members rallied around him following the publication of a harshly worded letter from the Kremlin to the Polish Central Committee.

A further paradox is that many of Kania's conservative critics in the Politburo now owe their own survival largely to him. During the election campaign, he supported several hardline candidates as delegates to the congress, and the endorsement was decisive in some cases. It is assumed that he did so partly to placate Moscow, but also to preserve party unity.

One of the dangers of such a large turnover in the middle ranks of the party hierarchy is the creation of a disaffected group of politicians who could form the core of future opposition to Kania. But, by supporting his chief rivals for reelection, he has effectively deprived this group of any natural leader.

A noticeable trend over the last month has been the softer political line taken by some of the politicians popularly regarded as hard-liners. Olszowski, in particular, has sought to project a more moderate image in keeping with the new balance of power within the party.

Polish political analysts now believe that the most likely result of next month's congress will be to preserve roughly the present political balance within the Politburo. But the Central Committee, which ultimately has the right to control the Politburo, is likely to be much more radical.

Inevitably, the new election procedures introduced by the Polish party have resulted in some stormy meetings over the past two weeks. Perhaps the most controversial took place in the western city of Poznan where Tadeusz Grabski, one of the hard-liners in the leadership, walked out in disgust when the conference refused to accept the Politburo's suggestions for candidates as delegates.

After a hectic series of telephone calls to Kania, the dispute was finally smoothed over and the Politburo's candidates eventually were included on the ballot. But, when the vote was taken, two of the four were rejected anyway.

The final tally in the Politburo was: 12 members or deputy members elected as delegates, four rejected. All the key leaders, however, managed to get through this first stage.

Of the newly elected delegates, most will be attending their first congress, and an overwhelming majority are aged between 30 and 50. This means the rise to power of a new generation of Poles whose adult years have been shaped by Communist rule.

This new generation of party members has only dim memories of the horrors of the World War II and the Stalinist period that followed it. Its representatives are eager to defend what they regard as Poland's national interests.

Most of them are also pragmatic and willing to enter real negotiations with the other political forces in Poland represented by the Catholic Church and the independent trade union federation Solidarity.

It is worth remembering, however, that they are also Communist politicians with ambitions of their own. Now that they are on the point of acquiring power, they have no intention of simply abdicating it to Solidarity.