E. C. Ernst Inc., the big Washington-based electrical contracting firm, yesterday shook up its top management.

Vice Chairman Charles Scharfe Jr. was named chief executive officer, replacing Chairman Edward Johnson.

The changes were made by Ernst's board, which has reorganized recently to give outsiders a majority of the seats, a company official said.

The shakeup came after Ernst last week reported a loss of $5.8 million on income of $129 million for the fiscal year ended March 31. The loss forced Ernst to omit its dividend, which under stock restrictions can be paid only from current income.

Another factor in the executive changes was Ernst's merger - effective June 1 - with L. K. Comstock and Co. Inc., another electrical construction firm.

Until now the merger had occurred in name only, but all operations of the two companies will be consolidated and the company's name changed to Ernst Comstock Corp., a spokesman said.

Domestic operations of Ernst and Comstock will be combined under direction of President John Martin and Executive Vice President Philip Mahoney; Martin is from the Ernst operation; Mahoney from Comstock.

Overseas operations will be directed by Robert Anthony, president of E. C. Ernst International Corp.

Ernst specialises in commercial and institutional construction electrical work. Comstock's businesses has been primarily utility and heavy electrical construction.