You are conflating two different series:
Count Olaf never interacts with Sunny. In ASOUE, the Baudelaire siblings are Violet, Klaus, and **Sunny (a human baby)**—but Olaf never puts her in a cage. He does imprison them in various ways (tower, car trunk, etc.), but no "cage" scene matches this description.
In The Bad Guys, Sunny the shark is never caged by the other characters.
Clarify the series and scene for a precise answer.