The Ares Project (https://www.aresnorthamerica.com/) did something like this with robot trains shuttling concrete blocks up and down a slope. No news on that project in awhile tho. I hope this idea is more successful.
Would also make it cheaper to build extra wagons, with a storage yard at the top and bottom.