Even political agendas and sensationalist trials need some leg to stand on to be successful. If you hire honestly and set pay honestly and fairly, with recorded justifications, it is unlikely that your company would suffer any negative repercussions of pay transparency. However, this doesn't mean "absolutely no company anywhere will run into legal trouble due to this"
There are always exceptions, but they are just that: exceptions. The existence of an exception or outlier does not disprove what generally holds true for everyone else.