Japan had no interest in invading Africa, they knew that UK had that on lockdown and they didn’t have the resources to do it. I am 100% sure that Japanese High Command would of double down on invading Australia over that. The idea behind controlling Indian ocean was to do two jobs. First: Close Burma Road since the Chinese were getting heavy equipment from the US. People forget the bulk of the IJA was in China and China was always the end goal for Japan. Two: Cutting the Persian trade route was more of a request from Germany. People forget that the Battle of Madagascar was the only battle during WWII that had both Germany and Japan in the same battle.