

It likely is going to fall under child neglect. I don’t know of an actual law specifically for locking a kid in a car.
As for the exceptions thing, that is the same in the states, it usually falls under law(s) categorized as “Good Samaritan laws”. They are moreso meant to protect the bystander if they see someone in peril but, breaking the window to save a kid or pet that is clearly in distress would normally fall under that. Personal injury also usually fall under these laws, like if you accidentally injured someone getting them to safety (like after a car accident) when it was clear they were in a dangerous location, it helps relieve the bystander liability.
It’s also supposed to be the reason that EMS/Fire/Police have Qualified immunity. because when the call to action arises, you don’t want your first responders first thought to be “How will this negatively affect me” you want it to be “how can I do the most in this situation”
Honestly, this isn’t a horrible idea. If the motion sensor is in a different location than the actual disposal, Like a motion sensor under a black panel instead of the light switch to remove the electrical hazard chance