Yeah, that law is pretty common in many parts of the world, a lot of people DIY building a E-bike ignore it and add a throttle anyway.
You can do it somewhat stealthy, so it's not obvious if the police actually check that but most dont.
All is well, until you're involved in a serious accident, then they'll make more of an effort to investigate.
There is some risk to it yes, but in NZ at least the law doesn't actually ban having a throttle.
It's more that the e-bike must:
"be designed to be primarily propelled by the muscular energy of the rider".
So it's more about what the bike was "designed" to do rather than what you're were actually using it for at any specific time.
This is a bit of a loop hole as it was never written to regulate home-built bikes, it was intended for e-bikes you buy in a store.
It also comes down to how you define "primarily". If you only ever use pedal assist but only put in 20% of the energy are you in compliance with the law?
If you have a huge battery pack that takes up a significant amount of space on the bike then it's pretty hard to argue the primary use of the bike is for pedaling.
But if you have a normal size battery and a throttle you can still argue that you primarily pedal when on the bike and it's hard for them to prove you don't typically pedal and just so happened to be using the throttle on the day of an accident. (assuming they can prove you actually were using it at all, which seems unlikely). And if the bike controller is set to always boot-up in pedal assist mode until you press a button to enable the throttle, then even better.