Fewer than one in 14 Japanese companies has a female president, a survey has shown, and more than half of the women inherited the role from a relative.