What i do is i put a little lube around the anus. I put a bottle of water up to my anus while in doggystyle position. I squirt the water in and hold it once i feel the slight discomfort i let it out on the toilet i repeat until the water comes out clear with no traces of poop
Sometimes having a bowel movement and then cleaning myself with water and soap is enough for me, sometimes I perform enemas, sometimes in the heat of the moment I don’t clean myself at all if I already feel clean enough.
The obvious is go to the toilet. If you're empty, it wont be messy. (Most people dont like the mess, some do, but dont ask)
Obviously you'll want to be clean as well as empty. So take a shower. Clean yourself as you normally would. Extra emphasis on your ass. If its clean externally and soft due to a shower, foreplay will be more enjoyable and lead to a better experience. It's also smart to use a finger ti gently clean your asshole, put pressure on to clean it and open it up a little bit, dont be rough. Soap will ALWAYS sting if the lining of the anus tears. It's good practice to warm up but be careful.
Now. You dont have to do an enema, but I would recommend it. To give yourself an enema, you can do several things. Being a male with a prostate, I use my shower head on a high pressure setting. It's not so powerful it does damage, but its powerful enough to get the water inside my anus. I would recommend doing a squat for this. You can also use the pipe of a shower head, or anything with a tapered exit (NO SHARP POINTS.) The lining of the anus is very delicate. You dont want to cut yourself. Some people like to use very soft pipe. Cut a small bit, put the pipe against your butthole, and have a partner pour some water down the pipe. This is good if you're not used to enemas, because you have help. When you hit your wall and need a short break, your partner can help keep you calm. It's not necessary, but it can be helpful.
There are 2 kinds of enemas. Short, and deep. A short enema is where you fill up the lower intestine with water, let it sit for a minute or two, then release. This will keep you clean for half an hour to an hour (long enough for most). If you're going for a bigger session (or if its sex and your partner is particularly well endowed) you'll want a deep enema. Fill up as much of your intestines as you can with water, but do it in bursts. Dont fill at once. You'll feel the weight of the water building and can intuit when to stop. Here, I usually stand up and finish washing my hair, and my face and such. Leave a deep one to sit for 10 minutes, minimum. If possible. The hardest part is staying calm, because your intestines are full of water it's easy to feel sick and queasy. Theres no shame in letting some out early. But you need at least some.
For a deep enema, i let it out down the toilet. For a short enema i just send it down the shower drain (removable top section so it opens up the whole pipe). When letting the water out, just let it. Like going to the toilet. Dont push too hard. For deep enemas you wont get it all out at once. Do what you can, let it settle, maybe exercise your lower abdomen (belly breathing basically). And eventually it will all come out.
You only need a deep enema once. I prefer to add short enemas after a deep one to make sure I am completely clean but that's just me.
Also if giving yourself an enema gives you toilet trouble and diarrhoea, the best course of action is another enema. Not as deep, and done properly. If water is retained in your digestive tract it waters down your poop, so make sure to get it all.
It can also be handy to use moisturizer for foreplay, as it will soften the skin as you relax, making penetration easier