THE DISTRICT'S police department is on the high wire. The city agency that is supposed to keep burglars out of your house as well as to contain the demonstrators who come to the nation's capital is faced with several challenges to its reputation in the months ahead.

Most important is the exodus of experienced, knowledgeable senior officers. Friday was the last day of work for seven of the department's 21 inspectors and five of its 12 deputy chiefs. In addition, several middle-level police officers, people involved in the nuts and bolts of the department, are retiring. Among them are the chief of detectives, the head of the career criminals unit, the head of the handwriting analysis unit, the head of the sex squad, the director of the morals squad, the police artist who draws sketches of crime suspects, the captain of the harbor patrol and seven of the eight men who train police dogs. In all, 230 police officers are scheduled to leave the department by the end of this month.

This flight of experienced personnel was prompted by the city government's offer of a 14 percent cost-of-living pension increase to officers with over 18 years experience who retire now. Policemen who stay on active duty will not get the cost-of-living pay raise. The plan was meant to save the city money by reducing the number of highly paid veterans on the force. It seems to have worked: Mayor Barry had asked that 204 officers be laid off before the fiscal year ends on Sept. 30. He now says that those men may not have to be eliminated because of the large number of officers who say they will retire next year. But the retirements are also depleting the department's bank of experience and knowledge. If the size of the force must be reduced, it would be better if the number of younger officers retained were balanced by retention of some more senior, experienced men. Perhaps that retirement plan should be withdrawn, deferred or limited to a certain number of officers.

Another factor in the department's crisis is race. The police force in the nation's capital was almost all white until the mid-1960s. But now it is over 40 percent black. The first black police chief leads the department under a black mayor. There are several young black officials seeking top jobs in the department. In that setting, some senior white officers feel their future is limited.

In a city with about 70 percent black residents, there is no doubt of the rightness of having the police department composed of a staff that has a sizable number of blacks. But the shift should not be made suddenly in a way that will cause a loss of experienced police staff and exacerbate the department's problems. Time is necessary to ensure that the next generation of police leadership is fully experienced.

While retirements and reductions are taking place, another threat to the department is entering the picture: increased crime. Armed robberies, a barometer of crime, have risen 32 percent this year over 1979, and so far this month there has been a 56 percent increase in armed robberies as compared with August 1979. Overall, the incidence of crime was 20 percent higher last month than it was in July a year ago.

The police department is not about to crumble under this pressure. But it is no understatement to say that it faces staggering problems. The mayor and Congress would be of great help to the department and the city if they reduced some pressure by keeping any staff cuts small and, if possible, by giving experienced officers the chance to defer their bonus pension plan.