I do not see why he can not fill out the application and send it to the embassy / visa office responsible for El Salvador. I do not see why he would have to go there.
You can try applying for a facilitation visa at the same time. You can state in your letter to the visa office that you are not able to spend a long time in El Salvador but as soon as he gets the visa, you will come and pick him up. However, note that for a facilitation visa, he has to have a passport. If he is in his mothers custody and she does not want to get him a passport, this will not work. The other problem is that if she refuses to let him travel, you will not be able to take him to Canada, citizenship or not unless your husband wins custody of him in El Salvador first.
You can try applying for a facilitation visa at the same time. You can state in your letter to the visa office that you are not able to spend a long time in El Salvador but as soon as he gets the visa, you will come and pick him up. However, note that for a facilitation visa, he has to have a passport. If he is in his mothers custody and she does not want to get him a passport, this will not work. The other problem is that if she refuses to let him travel, you will not be able to take him to Canada, citizenship or not unless your husband wins custody of him in El Salvador first.