Quite true.
If we can take Traffic Law compliance as an example, enforcement has definitely lead to greater compliance. Take excessive speeding for example. I spent a few years doing traffic law enforcement on the Hume Highway around Goulburn. At the time the speed limit on the highway was 100 kph. I wouldn't stop anything under 125 kph because there were much bigger fish to catch. Speeds up to 180 kph were not too unusual. The other month I drove through my old hunting grounds where the speed limit now is 110 kph. During a drive of about three hours I did not see one instance of excessive speed, and it was a Saturday when people were going from Canberra to Sydney for the weekend. So, to me that indicates that enforcement over time - a generation - has lead to reasonable compliance on the highway.
During the same years back then, Blood Alcohol levels above 0.180 were not uncommon. In the last years of my service, levels hardly passed 0.125. Again a combination of enforcement and generational change over time. One could also throw in the wearing of seatbelts. Who, now, does not feel naked driving along a road without having their seatbelt set?
However, and this is a big "however", I know that nit-picking enforcement has an entirely negative effect. In situations where a non-compliance is either trivial, or easily remedied, seeking compliance more often than not achieves it. The jack-booted, officious enforcer will never obtain compliance. Just look at the "flash for cash" speed cameras. With target speed settings unrealistically low for the locality, and operating where there is little likelihood of a "speed-related" incident, compliance lasts only on the near approach to the speed camera. And it is considered courteous for a driver to bring the presence of one of these units to the attention of other drivers who are approaching it.