however, what do you advise if he shows that he is unemployed because he hasn't been able to devote time to his freelancing for a longtime. Do you think he would face any hurdles to get a open work permit?
Yes, IMO, he could be refused. Based on your posts, his employment ties are almost non-existent or more correctly, they cannot be proved from a visa perspective.
I believe he would have some chance if he invests the time to regularize his employment/business before he applies (Read: Register it with government authorities, open a business bank account, etc etc). This could take some months, but could likely help.
Again, "unemployed" has a negative connotation especially for someone who is working..... even though your husband does not work full-time but he does work on-off. If he refers to his employment situation as "unemployed" in his visa application, it would create a negative impression that could impact whatever little chances he has in getting a visa.
His occupation falls under the highly skilled job type (he previously worked as a team leader, software engineer, with an IT firm). I'm just exploring my options. Your help in this regard will highly be appreciated.
Any reason why he is not taking his career seriously (sorry I get that impression).... or why he is no longer working in a mainstream IT company?
IMO, a 7-year break from full-time employment + with only on-off software work to show for the 7 years... is unusual.
If he has the financial resources, he could look into applying for a study permit for himself. An approval would, of course, depend on how long back he graduated, whether the study program he applies for would be in line with his work experience and his qualifications, etc etc