If I have a company that has been building some SAAS for several years. I am now looking to take on another person and give them 40% equity. Were should the IP of the software been maintained? Ideally it should be in a separate entity to the company that is doing business as a way of protection, but is this difficult with the co-founder who has equity in company but not in the IP company, if that makes sense.
The company owns the IP in the software.
If you take on another person, then you and he will each own part of the company, and the company still owns all of the software.
You don't need and probably don't want a separate company to own the software. There are situations where that might make sense but you haven't given any reasons to consider doing something like that.
You mention "protection," but that isn't a reason. The company provides the owners of the company with protection and no other protection is needed.
If you don't trust this other person, then don't make him or her part owner of your company.