The general condition to have no issues for Shedinja is dependant on the moves the opponent uses.
Flying, rock, ghost, fire, dark type moves are the only moves that can hit, however a pokemon with mold breaker bypasses this.
A focus sash can negate 1 hit, while focus band is mostly rng dependant if it prevents the move from killing.
Status effects that deal damage at the end of a turn, such as burn, poison, and fire spin, or self damage from confusion.
Doesn't proc the focus items, but a lum berry can bypass this issue.
Weather such as Sandstorm and Hail, unless you have safety goggles in gen 6-7.
Its unlikely you will win Gen 3 Kanto, Gen 3 Hoeen, Sinnoh, Gen 4 Johto, Either Unova, Kalos, or Alola Elite 4 with Shedinja alone, even leveled high enough, considering the odds of making it in one piece to get around the slow speed, and the time you need to set up the stats needed to take down the major threats.
TLDR: You aren't gonna win with shedinja, but you can only try