How old is Barkley? Has he been checked for any heart issues? Often times the coughing/hacking can be a sign of heart problems. We had two toy poodles at the facility where I work that both have severe heart problems and they both would cough a lot because of it. I would atleast get that checked out.
I'm sorry he's feeling so down and out. Keep us updated on how he is doing
BTW welcome to YT!