I believe Apples policy is to guarantee spare parts for 5 years, then the system becomes ”vintage” and you have two more years where they will repair IF they have parts. After 7 years the system is ”obsolete” and Apple will not repair. This is general for all systems and parts.
The four year program for keyboards is basically an extended warranty so that you do not have to pay for the repair.