Is it doable online - Yes & No (Depending on your power company)
Documents Required - It will depend on the power supplier Reliance/Tata/BSES
I have a Reliance connection at home, flat was purchased from the builder.
They ask for the following documents
-Sale Agreement Index II page copy showing buyers & sellers name alongwith their PAN Numbers
-Aadhar of buyer
-PAN of Buyer
-Some form which has to be filled requesting ownership transfer
-Share certificate (I am not really sure if it is required, but we had it in hand)
Complete process was done online
Since in your case the flat was purchased by someone else prior, the electricity company may ask for an agreement copy between the builder & previous owner so as to establish chain of ownership transfer.
It'll depend on your power supplier, their internal process and how efficient or lazy the employees are. I stay in Mumbai and the process was totally online & hassle free, the complete transfer was done on a week or so & I got a nice email about it stating new owners name will be embossed in gold on the electric bill & dropped in your letterbox from the next billing cycle.
A side note : The investor should have transferred the electricity bill in his name, would have made your life much much easier. Give your power company a call, they'll guide you better, but those documents are the basic things you'll need.