If you have Shell Armor, it is impossible to get hit by a critical hit, lest the Pokemon you are facing be wielding the abilities Mold Breaker, Teravolt or Turboblaze
This goes for Inner Focus as well. Even in haxmons battles, a Pokemon requires the abilities Mold Breaker, Teravolt or Turboblaze to crit or flinch you through Inner focus and Shell Armor
Shell Armor
> Shell Armor prevents Pokémon from receiving a critical hit.
Inner Focus
> Inner Focus prevents the Pokémon from flinching. Pokémon with this
> Ability can still flinch due to a Pokémon with Mold Breaker, Teravolt
> or Turboblaze.
![enter image description here](https://i.imgur.com/8fYLzs7.png)
Source 1
Source 2
Source 3
Source 4