Critics say the contentious shake-up could discourage foreign investment and undermine judicial independence,