It should be a redundant system. First, you need to deny the child access to the pool, a simple 4' fence with a high latch solves that. You can also make the fence removable if it has to be close to the pool. A socket mounted in the pool deck at each post would work well. The second part would be an alarm that sounds due to waves, you could even have a remote receiver mounted inside the house.
And fyi, around here a fence is required around a pool, and the alarm system is already a commercial product.
And fyi, around here a fence is required around a pool, and the alarm system is already a commercial product.