I don't think this is a terrible episode, however I don't think it's a great episode either. Its primary job is to establish Sophocles and Togedemaru as characters and show us what they're all about. The episode does a decent job at that, it does show quite a lot about them like how Sophocles likes to eat lots of ice cream but is a bit embarrassed about that, Sophocles being scared of the dark, Togedemaru's crush on Pikachu, and Sophocles's talent in programming. However, if you compare it to the other episodes that introduce the classmates like episode 5, episode 8, and episode 11, it lacks in showing the audience Sophocles's family and home life. Episode 19 rectifies this, so it's not too bad.
The primary thing that's a bit off in this episode is that the balance is a bit off in regards to Ash. The humour in torturing him is a bit too plentiful, there was no reason to repeat the gag of him running into a wall three times. The incidents with the washing machine and with his attempt at cooking are fine, but him leaping from the loft into the aquarium wall is dumb even for him, it's a bit too cheap of an attempt at humour and SM is usually better than that in how it executes its slapstick. It usually has some setup, stays more faithful to the characters, and sometimes has some kind of twist to keep things fresh (like with everybody getting shocked in the Minior episode, where they subvert expectations by delaying the shock with Togedemaru absorbing it initially, and then twist the relief around with Magneton).
It's far from the worst episode in Sun and Moon, there are some that are worse like the Alolan Dugtrio episode (which really took the format of an old Johto/AG filler episode in not being about anyone in the main cast at all), but it's far from great.