If the gene for the CD4 receptor was removed, would the person's immune system work normally? Could a new artificial receptor be substituted in place of CD4?
Could HIV infection be prevented in this way?
The CD4 receptor is vital for the proper functioning of the immune system. It is found not only on T-Lymphocytes, but also on macrophages and dendritic cells. Its function on T-cells is to stabilize the interaction between the T-Cell receptor and the MHC Class 2 (often known as HLA II in humans) antigen complex on antigen presenting cells and improves the affinity dramatically.
CD4 is also vital for the activation of Helper T-Cells (2). It is needed in the signaling which occurs in the thymus that selects for CD4+ T-Cells. If you were to delete CD4, you are, in effect destroying the adaptive immune system in humans, as there would be no CD4+ produced. In this situation, you would not get activation of B-Cells or Cytotoxic T-Cells, and the immune system would only be left with its innate defenses to protect it. This is found in diseases such as Severe Combined Immunodeficiency and can only be cured with early bone-marrow transplantation.
A better target would be the CCR5 receptor. This receptor acts as a coreceptor for the interaction between GP120, the receptor on the surface of the HIV capsid and the CD4 receptor. People who have a mutation in the CCR5 receptor are resistant to the most prevalent isoform of HIV, as the interaction is necessary for the capsid to fuse with the plasma membrane of the CD4+ cell.
See this article about the CCR5-∆32 mutation. HIV Resistant Mutation
I think it's deathly important to note how critical CD4 is for the activation of T-helper cells, and thus a myriad of downstream immune cells such as B cells:
When an APC presents an antigen through its MHC-II molecules, the TCR-II complex must interact with the Ag-MHC complex to transduce an activating signal. Note that the T-helper TCR is composed of α/ß molecules associated with the CD3 complex and CD4. CD4 is associated with an intracellular tyrosine kinase called Lck. Upon recognition of MHC-II by CD4, Lck phosphorylates the CD3 complex intracellular tails and the ITAMs of the CD3 zeta chains in concert with Fyn. Zap70 binds these phosphorylated sites to transduce the signal further (CD4 function, TCR signal transduction, and ignoring co-stimulation). To that, end there's some risk in knocking down CD4, or inadvertently modifying the receptor into loss-of-function.
Knocking out CD4 in a human would probably result in something similar to SCID (severe-combined immunodeficiency syndrome). If you're unable to develop T helper cells (Thymic selection), you're cutting off much of the ability for your immune system to modulate its defenses. B cells can still activate in a T-independent manner, but the types of antigens and responses are largely different (T-independent activation).
Being said, HIV primarily binds to CD4 through its gp120 membrane protein, and then facilitates membrane fusion through association with a chemokine coreceptor. Because of the above, you can't just delete CD4, it's quite dangerous from an organismal standpoint. Engineering a different receptor is a difficult way to go about it, as we don't know how that'll affect normal functioning, either. You can modify the chemokine, but it's also not guaranteed that the HIV wont shift to a different coreceptor (HIV tropism). Thus the best preventions so far have been to block adsorption, block HIV normal functioning through antiretrovirals, etc.
The take-home message is that modifications to our own cells have a capacity to do a lot of harm, but through good experimental design we can also do a lot of good, see chimeric antigen receptor T cells. We're also at an arms race with the pathogen as well, however, so it's a multi-dimensional problem that goes beyond the viral receptor!
Firstly, I would like to talk about the CD4 receptor. This receptor is present on the T-helper cells. These receptors help stimulate immune cells. HIV cells target these T-helper cells and reduce them in number. This reduces the hosts immunity overall. We could build an artificial cell with just the CD4 cells or make a substitute like you said. The HIV virus would bind to these artificial cells and then those cells would destroy the HIV cells.
Reasons as to why it's not possible This would still not be a cure as it would do nothing to address the cells that are already infected with HIV and are either latent or actively producing more virus. You would also probably have to continuously give infusions of these to the patients and thus would be to save only a few lives.