Data Rights - Every acquisitions contract includes data rights. The specific data varies by contract. For things like an LRU, the data rights may include schematics. This is, in theory, enough information to recreate the device but may leave out certain key proprietary pieces. Like if a 1980s era LRU had an M68k, no schematics from Motorola will be included. But the architecture is known so recreation is technically feasible. The schematics also offer a foundation for producing a like-product replacing the obsolete components, though a project like that can take years.
ICD - Interface Control Document. The device itself becomes a blackbox. Instead a description is provided, along with other requirements and spec documents, on how it behaves. The good ICDs are really enough to start a clean room project without ever needing to crack open the to-be-replaced devices. Unfortunately the good ones are rare, they often stop getting updated at some point and modern ICDs are shit compared to the documentation from last century.
COTS - DOD (and the US gov't in general) has had a major 30+ year push to go COTS as much as possible. Obviously this doesn't work for everything, but go back to that M68k example. There's no reason to ask for a custom chip when a COTS one will do. Same for other parts of major systems. Computer motherboards can be COTS (or very near) even if the chassis is bespoke to make it form and fit suitable for its intended environment. COTS, in theory, also makes it possible to do incremental refreshes more easily. Like replace that computer hardware in the custom chassis every 5 years, it's not trivial but it's a small jump and updating software components in such "short" (by DOD standards) increments is hardly onerous. In practice, updates may not happen for 20+ years which is a more substantial undertaking.
These, and other things that are supposed to be done in acquisitions, largely resolve the "What will we do in 20 years when the supplier has gone under" questions.