I do believe God's LAW punishes those who work against it.
It's not so much whether God punishes, but HOW He punishes. His LAW carries within it, both blessings and punishments.
Isaiah 3:1 "For behold, the Lord, the LORD of hosts, Takes away from Jerusalem and from Judah The stock and the store, The whole supply of bread and the whole supply of water;" (NKJ)
The whole supply of bread and water did NOT suddenly miraculously disappear from Jerusalem. It was used up, by the citizens of Jerusalem, surrounded by the Assyrians, or Babylonians, or Romans.
That WAS punishment. I could give a dozen examples of what happened when God withdrew His protection and blessing. Each time - God took responsibility for what happened to persons or to Jerusalem. He always said "I made it happen" or words to that effect.