Ethically you should put ALL the affiliations that contributed to the work. This included contributing to ANY of your expenses, living costs, research costs, travel costs, laboratory infrastructure, computer equipment, etc. used for the research.
If you are not paid by ANYONE to do (teaching and) research in the area of your paper, did not make use of ANY facilities or equipment not owned by you, did not do ANY work or thinking on an employer's time (think intellectual property) then you can say it is independent research, otherwise the affiliation of the supporter must be acknowledged. The primary source of support should be the primary affiliation. Depending on the publication venue you can provide additional affiliations or acknowledge other support in footnotes or acknowledgements. Funding for publication (from you or an organisation) can be mentioned in the acknowledgements like any other funding, and all funding really should be acknowledge unless the funder wishes otherwise. If you are affiliated with the funder (e.g. for self-funding through your consultancy) then this can go as an additional affiliation. This sharing of affiliation also makes clear that your university did not pay for everything needed.
I have never put "independent researcher" but have always put a relevant business/company name in some cases where support was officially declined for the project and/or I was between jobs or consulting. Putting "independent researcher" conveys the impression that this work is so unimportant that nobody would pay for it. As a consultant or employee, anything not actually covered by your contract and payment can be regarded as your intellectual property and independent research.
If you are an "independent researcher" then you have obtain your funding yourself, you support yourself, and are not receiving a salary to undertake research in the area of the paper, and you should thus regard yourself as a business and set things up as a business. You can register a business name or a partnership (e.g. with your wife) or incorporate a company, and use this name. Depending on where you are (legal residence/place of business) partnerships relating to your actual names may not need to be formally registered.
I am frequently in a position where I am a visiting professor somewhere and put both my substantive position and my visiting affiliation in an order that relates to where the bulk of the research and/or writing was done. But you really need to be able to justify this.
To make a closely related point based on the same ethical principals (often enshrined in a code of ethics by university, funding bodies, professional associations and/or journals): If you did any work on the paper or the underlying research at a university, you need to list the affiliation. If anyone else contributed in any way to the intellectual content or written form, this needs to be acknowledged, and if they contributed to both then they need to be an author, unless they specifically request otherwise.
Incidentally just providing funding (cash) or services (reviewing, technical assistance) doesn't require an affiliation or authorship byline, but should be included in the acknowledgements. On the other hand, provision of technical services or reviewing assistance that went beyond the call of duty and actually changed the direction of the project or lead to new conclusions (i.e. provided intellectual input and created intellectual property) does require the authorship and affiliation byline rather than just acknowledgement.