How to connect a "safety overflow switch" to "turn off a wall outlet"?
You just need a relay that includes an integral 24V transformer.  There are several of those on the market.  By "market" I mean the market of products intended and listed for use in mains electrical; the ones I'm thinking of mount in a 1/2" knockout in a junction box.  

You would probably want to move the safety switch wire to the NC position so that it contacts until an overflow.  That way if it becomes disconnected it will fail safe.