Western democracies should impose a domestic procurement ban on companies which sell to foreign governments without civilian control over their militaries. This would not require new export controls or restrictions on international trade, only voluntary divestment when awarding domestic procurement contracts on the public's behalf. Problem solved.
They would just do some wizardry to avoid the consequences like making a parent company with two subsidiaries that licensees the IP to the individual operating companies one for the domestic market and one or the undesirables.
Yes, but requiring socially undesirable accounts to be compartmentalized and spun-off may allow democracies to start removing the currently blatant conflicts of interest surrounding procurement and lobbying.
A longer term solution would most likely require imposing a scaling import tariff on non-democratic countries in proportion to their level of human rights abuses. This would establish a rule where their ability to acquire democratic foreign currencies redeemable for weapon systems automatically decreases on the margin if they they pursue authoritarian policies, and automatically increases on the margin if they pursue reforms.