The way I would solve that is by requiring that any software / documentation required for the operation, maintenance and repair of medical implants must be stored with some appropriate government body. If the company becomes unwilling or unable to service the product the information is made public.
Unfortunately, documentation simply isn't sufficient. In addition to parts or components not being manufactured anymore, you also would have the likely bigger issue of clinicians being hesitant or unwilling to work with the hardware, and / or insurance not covering the doctor's time or procedures. I believe such things already happened with the Second Sight fiasco.
I've seen (commercial) software put in 'Escrow' before when a client uses it; effectively a lawyer (or similar) holds onto a copy so that if the original company goes under, then the buyer can get hold of it.