E. C. Ernst Inc., a large Washington-based electrical construction company, yesterday reported a steep operating loss of nearly $4 million for the three months ended June 30.

The international engineering and contracting firm also replaced its board chairman and hired new accountants.

Separately, the Potomac Electric Power Co. reported a decline in profits during the first eight months of 1978.

Ernst said it had a pretax loss of $3.9 million on revenues of $38.6 million for the first quarter of its new fiscal year compared with profits of $868.834 (46 cents a share) on revenues of $28.6 million in the same period a year ago.

After accounting for reduction of taxes because of recent losses, Ernst had a net loss of $2 million in the recent quarter. Earlier this year, Ernst had surprised its stockholders by reporting a $5.8 million loss for the year ended March 31.

Charles Scharfe Jr., recently elected as chief executive of Ernst, said in a company statement that the recent quarter's operations reflect costs to date on some Middle East contracts without inclusion of estimated profits on the jobs, pending a review by newly hired auditors Arthur Young & Co.

He said Young was selected to replace Richard Eisner, following a merger of L. K. Comstock & Co. and Ernst on June I and a decision by the directors' audit committee to have a single accounting firm for both Ernst and Comstock. Young previously was auditor for Ernst from 1969 through March 1976.

Ernst's recent difficulties came to the surface when the Eisner firm told the company last winter that a reevaluation of contracts was necessary to account for some contracts on the basis of costs incurred without inclusion of estimated profits.

Scharfe, meantime, was given the additional job as Ernst board chairman yesterday. He replaced Edward P. Johnson, whom Scharfe already had succeeded as chief executive. Ernst said Johnson will remain a director and member of the executive committee.

As of June 30, Ernst had a backlog of contracts totaling $296 million and Scharfe noted pointedly yesterday that Ernst's share of this total was $175 million, up 52 percent from the same period last year. Scharfe previously headed Comstock.

Ernst also revealed details of a previously announced plan to raise capital to pay short-term debts and supply money for expansion. The firm will offer to its stockholders $10.75 million of 11 percent subordinated debentures that mature in 1993 with 1.6 million common stock purchase warrants in a package: each of 21,500 units will consist of $500 of debentures and 75 warrants. Owners will receive one right for each share held and 100 rights and $500 will be necessary for the purchase of one unit.

POTOMAC ELECTRIC POWER CO.'s earnings dipped to $49.6 million ($1.07 a share) in the first eight months of 1978 compared with $53.8 million ($1.14) a year earlier. Revenues rose to $469 million from $438 million.

For the most recent 12-month period, Pepco's profits also declined - to $80.7 million ($1.74 a share) from $93.4 million ($1.82).

Chairman W. Reid Thompson blamed inflationary pressures on operating and construction costs for the recent decline in profitability.

Pepco asked the D.C. public service commission in mid-1977 to increase electricity rates in the city by $45.5 million, or 16 percent, because of higher expenses and the agency has yet to rule on that petition.

Noting that Pepco's current rates are based on 1975 costs (a $29.4 million rate increase took effect at the end of 1976), Thompson said yesterday that "inflation . . . is hurting our our customers and our shareholders . . . we are experiencing constant increases which must be reflected in our prices."