This solution is for revenge! Warning: it's long and assumes mathematical maturity. I don't think anyone will even read it all. I seriously hope someone else posts an elegant solution. But I had to post this, because this problem is Putnam 2013 B5, which I failed to solve during the test despite working on it for an hour. I never looked at a solution, so this post is my way of getting revenge.
Call a set $C$ of stone boxes closed if all the keys for boxes in $C$ are locked inside boxes in $C$. A box is forever unopenable iff it lies in a closed set. We want to find the probability that there exists at least one nonempty closed set. Letting $S$ denote the set of stone boxes, we want to calculate
$$ \Pr\left[\bigcup_{C\subseteq S, C\neq \emptyset} C\text{ is closed}\right].$$
Using the principle of inclusion-exclusion, this equals
$$ \sum_{F} \Pr[\text{All sets in $F$ are closed}]\cdot(-1)^{|F|-1}$$
where $F$ ranges over all nonempty collections of nonempty subsets of $S$.
At first this sum looks hopeless: it is a sum over $2^{2^{|S|}-1}$ terms, each of which has a complicated probability. But we can force almost all of the terms to cancel, using a clever bijection.
Let $F$ be a collection of nonempty subsets of $S$. Call $F$ weird if $F$ contains a pair of non-nested sets. Define the smallest pair of a weird set $F$ to be the pair of sets $C$, $D$ in $F$ minimizing $C \cup D$, breaking ties in some arbitrary but consistent way.
Define the twin of a weird set $F$ as follows. Let $C$, $D$ be $F$'s smallest pair. Then the twin of $F$ is obtained by taking $F$ and toggling whether it contains $C \cup D$. With mild casework, one can show that the twin of the twin of $F$ is always $F$ itself.
So, the twin relation partitions the weird sets into twins. Let $F$ and $F'$ be twins. Let $C$, $D$ be $F$'s smallest pair. It follows from the definition of closed that if $C$ and $D$ are closed, then so is $C\cup D$. Therefore, all sets in $F$ are closed iff all sets in $F'$ are closed. Also, it follows from the definition of twin that one of $F$, $F'$ is exactly one element larger than the other. Therefore, the terms for $F$ and $F'$ cancel in the gigantic sum above.
This cancellation cancels out all terms in the gigantic sum using a weird set $F$. What is left? The sets $F$ which are not weird, i.e. where all pairs of sets in $F$ are nested. In other words, the sum now ranges over nonempty collections of nested nonempty subsets of $S$. We rewrite the sum:
$$ \sum_{S \supseteq C_0 \supset C_1 \supset \dots \supset C_k \neq \emptyset} \Pr[\text{$C_0, C_1, \dots, C_k$ are all closed}]\cdot(-1)^{k}$$
where $C_0 \supset C_1 \supset \dots \supset C_k$ ranges over all nonempty sequences of nested nonempty subsets of $S$.
Define the weight of a set $C\subseteq S$ as follows.
$$ weight(C) := \sum_{C \supset C_1 \supset \dots \supset C_k \neq \emptyset} \Pr[\text{$C_1, \dots, C_k$ are all closed | $C$ is closed}]\cdot (-1)^k$$
I claim that the weight of a set $C$ equals $1$ if $|C|=1$, and $0$ otherwise. The proof is by induction on the size of $C$. The base case, $|C|=1$, is a sum over one term which equals $1$. For the inductive step, assume the statement is true for all $|C|<n$, and consider a set $C$ of size $n$. In the sum in the definition of the weight above, we isolate the term where $C_1, ..., C_k$ is the empty sequence. This term adds $1$ to the overall sum. The rest of the terms all contain a set $C_1$. We rewrite the sum thus:
$$ weight(C) = 1 + \sum_{C\supset C_1 \neq \emptyset} \sum_{C_1 \supset \dots \supset C_k \neq \emptyset} \Pr[\text{$C_1, \dots, C_k$ are all closed | $C$ is closed}]\cdot (-1)^k $$
$$= 1 + \sum_{C\supset C_1\neq \emptyset} \Pr[\text{$C_1$ is closed | $C$ is closed}]\sum_{C_1 \supset \dots \supset C_k \neq \emptyset} \Pr[\text{$C_2, \dots, C_k$ are all closed | $C_1$ is closed}]\cdot (-1)^k$$
$$ = 1 + \sum_{C\supset C_1} \Pr[\text{$C_1$ closed | $C$ closed}] \cdot (-weight(C_1)) $$
By the induction hypothesis, all $weight(C_1)$ terms are zero except the ones where $|C_1|=1$. Thus, the sum equals
$$ = 1 + \sum_{\{s\}\subset C} \Pr[\text{$\{s\}$ closed | $C$ closed}] \cdot -1 $$
$$ = 1 + \sum_{\{s\}\subset C} -\frac{1}{|C|} $$
which is zero. This completes the inductive step, finishing our calculation of the weight function.
Now, what was that sum we wanted to evaluate again? Here it is:
$$ \sum_{S \supseteq C_0 \supset C_1 \supset \dots \supset C_k \neq \emptyset} \Pr[\text{$C_0, C_1, \dots, C_k$ are all closed}]\cdot(-1)^{k}$$
This sum ranges over all nonempty sequences of nested subsets of $S$. Since the sequence $C_0, C_1, \dots, C_k$ must be nonempty, it must always contain a set $C_0$. We rewrite the sum, in a similar way to our proof of the inductive step of the weight function.
$$ \sum_{S \supset C_0 \neq \emptyset} \sum_{C_0 \supset C_1 \supset \dots \supset C_k \neq \emptyset} \Pr[\text{$C_0, C_1, \dots, C_k$ are all closed}]\cdot(-1)^{k}$$
$$ = \sum_{S \supset C_0 \neq \emptyset} \Pr[\text{$C_0$ is closed}] \sum_{C_0 \supset C_1 \supset \dots \supset C_k \neq \emptyset} \Pr[\text{$C_1, \dots, C_k$ all closed | $C_0$ closed}]\cdot(-1)^{k}$$
$$ = \sum_{S \supset C_0 \neq \emptyset} \Pr[\text{$C_0$ is closed}]\cdot weight(C_0) $$
By our calculation of the weight function, all terms are zero except those where $|C_0| = 1$. Thus, this equals
$$ \sum_{\{s\} \subseteq S} \Pr[\text{$\{s\}$ is closed}] $$
This, finally, is an easy sum to calculate. Let $n$ be the total number of boxes. Then the sum equals
$$ \sum_{\{s\} \subseteq S} \frac{1}{n} $$
$$ = \frac{|S|}{n} $$
Therefore, the probability that there exists at least one closed set is $|S|/n$. Therefore, putting $k$ as the number of wooden boxes, the probability that all boxes are openable is $k/n$. In conclusion, this variant has the same answer as the original question.