One of Japan’s most reclusive companies, Fanuc Corp. has spent decades building a wall of secrecy around its ultra-profitable industrial-robotics business.