The EU’s executive arm last year accused the Polish government of undermining democracy and rule of law after the party overhauled the constitutional court to make it more difficult for judges to block new legislation.