How do you do that (pardon my ignorance)? Get a gunsmith to do it?
You might have to go that route if you're not familiar with the process, Another option that I've considered when I get a new 5/8x24 threaded rifle is going to be making my own BFA with an adjustable needle valve of sorts or eccentric scroll/snail valve like the HK originals. Having a machine shop helps. So if you think its over your head I would go talk to a competent gunsmith...not just some guy who works on AR's on his mom's kitchen table.
There are some other work arounds you can try but they can be dangerous if you use too much restriction off the bat. A poor mans way could be to take a cheap steel flash hider the kind with a bunch of holes all around it and have the exit hole welded up. Then thread all the smaller holes for set screws and one by one close them up until you get reliable function with your weapon. I would be sure to paint that modified muzzle device a bright red color or something so you don't forget to take it off when you go back to live ammo.
I got the adaptor re tapped 5/8x24 but I don't know if it will slide over the back side of the barrel might have to bore the ID out just a bit. Waiting on a size. Blank adaptor hole is 16.13mm. .635. At the rear.