Loperamide is much more available than kratom and you get what you pay for since the product is consistent with it being a pharmaceutical drug. It's cheap and it's over the counter, so it's a better option IMO, although if you have a good vendor where you can get Kratom and you know it's a quality product and you're able to order it and have it sent to your house, yes it is an option.
With loperamide for the longest time I was very skeptical about the efficacy of the drug since on paper it doesn't cross the blood brain barrier and at the usual doses it has no psychoactive effect. However there comes a point when the anecdotal evidence is so overwhelming that it becomes obvious that the drug works when you're taking large doses for opiate withdrawal (WD). Too many people try it and find it works, reporting success on bluelight which I've gleaned from all the posts I've read on Bluelight over the years. So a small proportion of the drug evidently makes it through the blood brain barrier and this amount is enough to stave off withdrawal but not enough to have typical opiate effect on the brain by being active on the u-opioid receptors. Since the drug is used to treat diarrhoea the main side effect when taking mega doses for opiate WD is constipation but I've found that a combination of lactulose (15ml morning and evening) and Senna (extra strong) in the evening more than counteracts the effect on the gastrointestinal tract. It may even be too effective for some people, causing diarrhoea so you may be better off just sticking to the lactulose. Alternatively another osmotic laxative like polyethylene glycol (Movicol) will work just as well as the lactulose but I've found the lactulose easier to manage since I only need to take it twice a day as opposed to one sachet of Movicol four times a day, each one dissolved in 125ml water.
Good luck! You have my sympathy as I know too well the pain of opiate withdrawal.