This has been a feature from the start of Sims 3. However, it got much, much easier after a patch that enabled placing fences and walls right on the pool edge. Before that you needed to place some objects in the sims' way out of the pool. Best tetris exercise I've had in a long time, but having a fence around the pool is more effective.