In the major cities of industrialized countries at the end of the nineteenth century, important public places such as theaters, restaurants, shops, and banks had installed electric lighting, but
electricity was in less than one percent of homes, where lighting was still provided mainly by candles or gas.
Option Elimination -
Let me share a simple example to make it easy to understand.
At the end of 2014, I started to work at Volvo - Correct. Here, this sentence effectively communicates a specific point in time (the end of 2014) when I began working at Volvo using the past tense ("started").
Let's complicate a bit.
At the end of 2014, India had achieved massive modernization of the city buses with automatic gearboxes, low noise pollution, comfort, etc., and I started to work at Volvo. - Correct.
Here - India had achieved massive modernization in terms of new buses with automatic gearboxes, low noise pollution, comfort, etc., by the end of 2014. This uses the past perfect tense ("had achieved") to indicate an action completed before another past event, which, by the way, is "by the end of 2014." - Okay.
I started to work at Volvo. This uses the simple past tense ("started") to indicate the initiation of your employment at Volvo at the end of 2014.
Is there any need to use the past perfect in the 2nd part? No. But if I started working at Volvo before 2014, then I could use past perfect, and a new sentence would look like this - At the end of 2014, India had achieved massive modernization of the city buses with automatic gearboxes, low noise pollution, comfort, etc., and I had started to work at Volvo. So here, India achieving modernization and I starting at Volvo happened before 2014.
So, we need to look at the context and meaning.
Now, back to our question. Here, the sequence is that by the end of the 19th century, the public places already had installed electric lighting, but in terms of homes, only 1% had electricity. The meaning is not that "1% of homes had electricity by the end of the 19th century." Imagine that both happened by the end of the 19th century, then there would not be any contrast. Right? Yes, then we don't need "but." So, because we have "but" in the non-underlined part, we need to bring the contrast: "While X had installed (past perfect) A at the end of 1890, only 1% of Y obtained (simple past) A."
(A) electricity was in less than one percent of homes, where lighting was still -ok
(B) electricity was in less than one percent of homes and lighting still - "and" demands strict parallelism. After "and," we have a phrase; before, we have a clause - not parallel.
(C) there had been less than 1 percent of homes with electricity, where lighting was still being - "had been" is wrong. There is no contrast, then. Moreover, "where" modifying "lighting"? Really? Wrong.
(D) there was less than 1 percent of homes that had electricity, having lighting that was still - SV issue. We need "there were." The correct usage of "having" is "Having finished her work, Anamika went for a walk." The structure and meaning of "having" are messed up here.
(E) less than one percent of homes had electricity, where lighting had still been - "where" modifying "lighting"? Really? Wrong. Moreover, using past perfect "had been provided" is a total mess. The homes that used candles and those (less than 1%) - happened simultaneously, so we need the same past tense.