Background
Consider the measurement. The measurement maps an arbitrary energy eigenstate $|E_i \rangle$ to $| \phi \rangle$:
$$|E_i \rangle \to | \phi \rangle$$
with a probability of this outcome is $|\langle E_i | \phi \rangle|^2$. Note the density matrix remains unaltered.
What if I have $2$ Hamiltonians $H$ and $\tilde H$ with eigen energies $|E_i \rangle$ and $|\tilde E_j \rangle$. Let us assume they are of the same inverse temperature $\beta$. I place them in contact and by zero'th law of the probability of finding a particular energy or temperature should remain the same.
Thus, a possible mapping seems to be
$$ |E_i \rangle \otimes |\tilde E_j \rangle \to | \phi_{\beta} \rangle \otimes |\lambda_\beta \rangle$$
where the probability of this outcome is $?$
One can think of the measurement as a possible mapping where the average energy(/momentum/any other symmetry) here is conserved. With that in mind this mapping can be employed to conserve probability (take into account the probability of finding $E_i$ and $\tilde E_j$ is $\exp(-\beta (E_i + \tilde E_j)$) is but not energy?
We know by the sudden approximation if I "suddenly" put them in contact:
$$ H \otimes 1 + 1 \otimes \tilde H \to H \otimes 1 + 1 \otimes \tilde H + H_{contact} $$
then the eigenstates won't have time to react and thus remain the same. One (false) way explaining away the situation is to say $H_{contact}$ is negligible and one can employ the sudden approximation. However, if that were the case then we should be able to neglect $H_{contact}$ even when $H$ and $\tilde H$ are of different temperatures!
Question
How does the literature resolve this contradiction? (Feel free to confine this study to a specific physical system as well)