Raid is just a word WoW has been using to describe a bigger group. But raid mechanics could be designed around 5 people without any problem, except tank swapping, which only concerns 2 people out of 20 so it's basically a non factor.
Having more people do the same mechanic does not mean it's harder or more complexe, only means more people are involved and the chances of failure are greater. The amount of failure does not indicate the complexity of a mechanic because it counts in the inabilities of the players, a mechanic is complex based on what actions need to be performed in order to overcome this mechanic. Sitting in a circle to soak it is one of the most simple mechanic, yet one of the most failed ones in WoW because the players are not good, not because the mechanic itself is too complexe.
Sometimes the complexity comes from overlapping a bunch of mechanics together, which is doable in 5man just as easily.
Everybody does their thing individually in a raid anyways, we only control 1 character regardless of how many is needed for one mechanic, so everything can be scaled to work with 1 player seriously what's the point of having 5 people doing the same shit? In a 5man you could easily have one shit to soak, a pillar that spawns somewhere that needs to be clicked and an add to burst down all at the same time. That's already more than most raids. Tank swaps can easily be replaced by an aggro drop, a boss focusing a dps, adding a new secondary boss in the fight or having 2 bosses taking turns, requiring retaking aggro when that happens, etc, there's plenty of stuff that can be done but for the longest time, dungeons have been made to be the easymode group content for people who want to chill basically, so nothing is actually complex.