Apple Inc.’s biggest legal battle with the U.S. government ended abruptly this week, but in Europe the fight between law-enforcement authorities and technology firms over encryption, privacy and security is heating up.

European police haven’t been able to break into more than 40 encrypted phones involved in recent investigations, said a senior law-enforcement official. Some legislators in Europe are pushing to compel companies to...