There's no way to do it safely.
There are ways to reduce the risks, but no way to do it safely. Maybe somebody knows more about this and shares, but my recommendation is to find a partner for it. Even with a partner it isn't exactly safe, but safer.
I always cringe when I see that someone is trying this. I know some people think electroplay is not safe, but trust me, electricity always acts the same way. You just have to understand it.
Asphyxiation or breath play is very much edge play. I'm guessing you'll have some others post to this thread with pointers on how to do it and do it safely. I'm not the one for that. I'm on the side of this being unsafe. With some things, it's just a matter of time before it catches up with you.
Yeah, there is no way to do this safely, there is only ways to reduce the risk. That said, I'd check out breathplay in the library, there have been quite a few conversations regarding this. Good luck.
I LOVE autoerotic asphyxiation, but the obvious problem is that there is no way to use a safe word if something goes wrong. Just remember that you only need a little pressure for the pleasure and more pressure DOES NOT increase the pleasure. Play it on the safe side, and don't kill yourself or your partner just for an extra special session.