Is it okay to close a question as a duplicate of another closed question?
Not, it is not. It should only be allowed to close a question as a duplicate if the question you're redirecting people to is not also closed or a duplicate.
When you close a question as a duplicate, the intent is to redirect people who'd like to add an answer to the original, prior question so that they can add their answer to the earlier one instead, if necessary. The point is to make a set of "canonical" Q&As that become referenced on Stack Overflow again and again.
By redirecting someone to yet another closed question, you've missed the whole point of Stack Overflow and prevented the person from answering on either question. This is especially bad when the "duplicate" question you link to has no duplicate itself, and a potential answerer is left with no place they can answer.
Trivial example:
How to store both integers and strings in a vector? [duplicate] - closed as duplicate:
The above question points to this one: In C++ when should we use std::any, std::variant or std::optional? [closed], which is closed and does not redirect to any open question:
This should not be allowed. It should only be allowed to close a question as a duplicate if the question you're redirecting people to is not also closed or a duplicate.