And something like that definitely doesn't exist: the implementation is flawed.
What is the specific problem with the implementation? I mean, is it possible to optimize this building using the artifact shop (i.e., in effect, it would be like selling some artifacts and buying others, but not randomly generated ones, but specific ones. Although random ones could also be used, but of higher quality.)