I was thinking about such edging device too.
You can create a butt plug with a pressure sensor. When you are nearing orgasm your pc muscles contract and put pressure, then you'd turn off the stimulation. No idea if that works similar for girls too.
There is a concept for that same idea here...