You assume that the piston fully retracts into the caliper when you release the brake. But that's not true.
When the pad wears, it becomes thinner, and the piston moves out to compensate. But when the brake is released, the piston retracts only a little, just enough to remove the pressure from the pad. You can't even see it.
When the pads are replaced, the pistons have to be pushed in first to make room for the new, thick pads. As last step, the pedal has to be pressed several times to "pump out" the piston until it pushes the pad to the disk.
Your lever would push the piston in as much as it can, or until the piston touches the back side. In the first case, the piston would move in a little more, and there is no braking power at all. Only in the second case, your system could be able to hold the vehicle.
And when one wants to drive, this parking brake must be released first, and the pedal must be pressed may be 10-20 times to the floor until it becomes hard again. During this time, your car has no working brakes!
Here is a related question, for which I found this animation:
And two more points:
The force applied onto the piston when pressing the pedal is very high. You should not weaken the piston by cutting out parts for your mechanism, and your mechanism should be able to withstand the force if someone presses the pedal while your system is active.
Next, there is almost no space to mount anything to the piston from the side, it would be challenging to develop such a system for an existing brake.