Supposedly all identified and included in the contract as part of the CADMID cycle (Concept, Assessment, Design, Manufacrure, In-Service, Disposal).
e.g. The product can be designed so that it open-source and modular so that software & hardware can be easily replaced and up graded during its life, so you don’t have to produce and stockpile spares at the start fo4 fear of not being able to source them. Supposedly one o& the design points for the NGAD..
Not much you can do about the production line - look at those for the F-22 and C-17. When they’re gone - they’re gone.
Disposal remains a pipe dream in many cases - which is why SSN/SSBN hulks are tied up alongside decades later - and ships full of asbestos are sold to scrappers in Asia to export the problem…