I did rewatch the episode, and my interpretation is completely the opposite. That’s why I referenced Guy Ritchie movies, as he is a master of this technique, which combines narration by a character who may or may not really predict what actually happens, or who may describe different possible scenarios.
The Casterly Rock attack sequence is broken up into two completely separate sections, with each one based on Tyrion’s narration.
In the first segment, Tyrion talks about how Cersei will be expecting them, that the Rock’s walls are impregnable, and that the Unsullied will suffer great losses, while showing the Lannister army on the walls raining down hell on the advancing Unsullied forces who are unable to scale the walls.
Then the scene cuts back to the Dragonstone strategy room. Tyrion says the battle would go exactly as he father had planned, except that Tywin had not planned on the sewers. Tyrion explains how it was something too low for his father to do, so he chose the lowest person (Tyrion) to do the job.
Tyrion explains that he was commissioned to build the Casterly Rock sewers and built a secret chamber under the main guard post where he could meet the whores, since they could not enter the city normally.
During this description, we see Grey Worm and a few men in one boat sail into the secret cove, kill the guards, and open the “impregnable” main gates, while making a reference to Bronn’s famous quote “Give me ten good men and I’ll impregnate the bitch.” As the army enters the castle, there is no resistance coming from the walls above, as the castle is almost deserted.
After they kill all the Lannisters, Grey Worm sees Euron the Time Traveller and his fleet of instant ships™ (Just add water!) destroy what’s left of Daenerys’ navy. He asks a wounded soldier where the Lannister forces are, and the scene cuts to the main Lannister army on their way to take the castle at Highgarden and destroy house Tyrell.
We know that Jamie left Casterly Rock defended by a skeleton crew that was caught unawares by the use of Tyrion’s secret passage. So there’s no way the Unsullied faced any real resistance. The only losses were on the sea.
BTW, the combination of losses suffered at Casterly Rock and during the Loot Train Battle, have left the Lannisters with only a decent sized army at King’s Landing. Without the Gold Company, Cersei couldn’t retake the five southern kingdoms even if they were vacant.
If Daenerys had any sense at all, she would leave the Dothraki to take control of all the lands in the south, as they will never survive the snows of winter in the north. If you look at what happened to Stannis’ horses during the first bad snow storm, not one Dothraki horse will survive the trip to the wall.
Well, it looks like we’ll have another year or so to banter around our theories. Enjoy!