This high price is mainly caused by political decision ( subsidization of renewable energy sources).
Electrical heating is not really common in Germany: My grandfather build this house during the oil crisis in the 70's. Originally, an oil heating was planed but due to the uncertainty in the oil supply he switched to electrical heating (electricity was much cheaper at this time).
RE: DIY: IoT energy logger