After another day of fun and games the problem has been finally diagnosed. The shower valve in the first floor bathroom had gone faulty causing high-pressure cold water to push back on the hot water all the way into the tank - hence allowing some water get heated but not much.