TSUBAME, Japan—For the second time in less than three weeks, loudspeakers across northern Japan on Friday alerted people that a North Korean missile was headed their way and told them they had minutes to seek cover. Smartphones buzzed Friday as the missile passed over the island of Hokkaido and landed in the Pacific Ocean.

Japan’s sophisticated emergency alert system, known as J-Alert, can get the word out within four minutes of a missile launch. But officials say training a nation of about 127 million people how to respond...