Would it be possible and viable to store the cut off links in every chain replacement and eventually link those together with a bunch of quick links to form a new chain?
In theory yes, in practice unlikely it is worth it.
For chains targeting 8 gears of less, the pins are reuseable, but for modern chains of 10 speed or higher, you need replacement pins. The cost would likely become more than a chain.
Do you always buy the same brand and model of chain? If you, are you sure the manufacturing will not change over the span of time you are thinking about.
Let say you actually have a collection of leftovers, and you have the pins to assemble them into a useful chain and the time and desire to do it. IN my experience, reassembled links are less reliable than virgin links from the factory. Your 'new' chain is far less likely to preform like a new chain than a new chain.
If you are worried about this, consider buying chain by the roll, and when you replace chain, remove exactly what you need so you have no leftover links.
Yes, but lets work the costs - A single chain costs me $55 (SHIMANO 105 11-Speed Road Chain CN-HG601-11) and has 114 links. This chain will last ~3000 km because I wax.
My bike only needs 108 links so I take off 6 links and store them.
I'd need to save the 6 link offcut from 18 seperate chains to total 108 links.
18 chains will take me about 54,000 km which is at least 5 years riding for me.
18 chains is $990 based on today's price and will likely go up over the coming five years.
To join all those pieces of chain you need to either reuse the pin pushed out (which is not recommended because its too sloppy on second use) or buy/fit a quicklink/master link, or buy/fit a new one-time use pin.
Quicklinks prices range from 55c to $20 in price, and you need 18 of them, which is another $10-$360 in price. At the higher end you could instead buy 6 more brand new chains for the cost of those quicklink joiners and ride another 18,000 km.
Picking a chain that comes with a new quicklink every time, and save it for reuse may help reduce the cost of joiners. I believe some KMC chains include one.
Answer Yes, it is definitely possible to assemble another chain from offcuts, but its akin to a builder straightening bent nails - not really worth your time for one chain ever 18 chains.
I do hold onto the offcuts for repairs, or extending a chain where I've upsized a cassette's low gear.
On the other hand, my recumbent has a ~270 link chain, so I have to buy three x 114, but only use 2 1/2 chains. I'm left with a single ~70 link offcut and that means the very next chain swap I'd only need two additional chains to make the length required.