Note it was not the ECJ which struck down the law first, they did it after the BGB did strike it down, partially because they did not want to get into a fight about who has primacy in decision making I believe (the BGB still claims to have the last word, changing this would be unconstitutional in Germany).
I don't think politicians "hiding behind the EU" is what is actually happening, what actually happens is collusion to shift away power from the people by obfuscation and misdirection. People like Schäuble have active contempt for democracy (According to Varoufakis he told him "Elections can't change economic policy"). See for example this discussion of ECB policies (https://www.yanisvaroufakis.eu/2017/03/14/19258/).
I truly believe the EU has to go, in order for Europe to not further slide into a corporatist neo-liberal nightmare. It is very unfortunate that this push is lead by right-wing nationalists.
It basically the same thing that keeps happening within Germany, it seems like the institutions work equally well or badly.
Now what is a problem is that national politicians like to hide behind the EU. That's why you should always check who voted for these things in the council. Usually it's the same people (or at least parties) who later they the EU is forcing their hand.