Repairs and rehabilitation of components for electrical machines