Generalization: In order to generalize to higher cardinals (up to the first inaccessible), we will need to use $\kappa$-centered ideals on $\kappa$ (instead of $\kappa$-dense). An ideal $I$ It is $\kappa$-densenot clear at all if there are collection of $\kappa$ filters $\mathcal{F}_\alpha$, $\alpha < \kappa$ such that $I^+ = \bigcup_\alpha \mathcal{F}_\alpha$.
By a theorem of Foreman (appears inwe actually need the Handbook, page 1047, Theorem 7large cardinals here.57) Also, it is consistent relative to a huge cardinal that every regular cardinal $\kappa$ carries a $\kappa$-complete $\kappa$-centered ideal. Moreover, for accessible $\kappa$, those ideals (and also their restriction) are not $\kappa$-saturated, so every positive set $A$ can be partitioned into $\kappa$ positive sets.
Let's assume that in $V$ for every regular $\kappa$, there is $\kappa$-centered $\kappa$-complete non-trivial ideal. Assume also $GCH$, for simplicity.
We will show by induction on cardinals $\lambda$ less than the first inaccessible (if there is one), that the product of $\lambda$ copies of the Cohen forcing collapses $2^{\lambda}$. In fact we will construct the coding method (relatively) explicitly.
Case 1: $\lambda = \mu^+$. This is similarclear if it's possible to the $\omega_1$ case above. Let $I$ be a $\lambda$-centered, $\lambda$-complete ideal on $\lambda$ as witnessed by $\{\mathcal{F}_i \mid i < \lambda\}$. We will generically code every element $y$ of $2^\lambda$ by an ordinal from $\lambda$ and a natural number (which in turn are generically coded by a natural number, by the induction hypothesis). Let $p$ be a condition and assume that $n$ is a natural number such that $C = \{\alpha < \lambda \mid n\notin \text{dom }p_\alpha\}\in I^+$. Assume thatgeneralize this set is in $\mathcal{F}_\gamma$. Since the difference between all two sets in $\mathcal{F}_\gamma$ is in $I$, we can pick an arbitrary element there and split it, as before, to $\lambda$ sets - $\{F_i \mid i < \lambda\}$. Again, those sets can be assumed to be disjoint and their union is $C$, up to an element from $I$method. We continue, and extend $p$A direct attempt to code $y$ in the generic in the same way as above: $q\leq p$, $q_\alpha(n) = 0$ iff $\alpha \in F_i \cap C$ and $i\in y$ so $y$ will be coded by $(\gamma, n)$ in the generic filter.
Case 2: $\lambda$ is singular. Let $\{\mu_i\mid i < \text{cf }\lambda\}$ be a cofinal sequence, $\mu_0 > \text{cf }\lambda$. We splitgeneralize this method would require the product into a productexistence of dense ideals on both $\text{cf } \lambda$ parts. It is clear that every element of$\omega_1$ and $2^\lambda = \prod 2^{\mu_i}$$\omega_2$ which is coded by an element inopen problem $(\omega^{\text{cf }\lambda})^V$, but the latter is coded with a natural number, by the induction hypothesis.
It is not clear at all if we actually need the large cardinals here(see comments below).