it's easy for seasoned battlers to forgot the breadth of skill levels across pokemon's playerbase. a lot of people really don't interface with pokemon outside of playing through the main story and the ways they might construct their team is far too large to narrow down. the gyms being type-based is definitely a relic of the first generations, but make things too complex and you're inevitably going to push away people you don't need to be.
a core issue with making pokemon difficult is that so many tools are available that any potentially "difficult" fight can be made trivial just by foresight. an initial playthrough can be tough blind but the replayability of these games largely comes down to user-based stipulations: this is why nuzlocks are so popular, and nuzlocks are difficult precisely because they
limit your available options to an extreme degree compared to usual gameplay.
and yeah as others have said, pokemon is so impossibly complex that trying to craft an ai that isn't just cheating every turn can't really happen. honest if you want the ai to be scarier just make it less predictable, have some trainer ai systems randomly switch or read your switch out with a stray coverage. simpler is better here imo.
i dont find vgc-styled battles to be the best route, losing fights isnt much of a punishment anyhow and letting a player know the opponent's team is either too much info for experienced players or sorta irrelevant for newer ones who may not even know what a particular pokemon does. again, much of a pokemon game's difficulty is going to come from a first playthrough where each battle is its own new puzzle you need to work through. once you know the solution to said puzzle the best way to make it harder is let players go at it themselves. (ive been doing a fairly painful run of scarlet where i can only use monotypes that don't have evolutionary lines, and a number of fights asked a lot of my planning skills and its been quite fun to work through.)
really to make gyms more interesting they need to have them stand out more beyond "uses one type." sv has really lackluster gyms as many fights eschew available type variety just to tera back into their designated type: having a pure fairy like florges would make the psychic gym much harder, but by this point you know the tera is coming so you just click the dark move again and win. larry and iono are the only gym leaders to use tera in a novel way, the former is making their ace hit even harder with normal stab, while the latter uses a pokemon whose ability renders electric's sole weakness completely useless. i get the appeal of giving a pokemon a new type it can take advantage of allows for more unique encounters (the grass sudowoodo can be a real pain for unprepared players) but it just serves to make fights that already have clear winpaths even less of an obstacle.
i agree with the notion of having gyms be less type spam and more strategy focused: there is value in giving a player type-biased battles as they can apply extra pressure on your team's weaknesses, but the reverse is that some gyms are laughably easy. so rather then a poison gym leader being "can you ko 5 poison types" it should instead adhere to a theme relating to said type. poison is often associated with defensive and wearing the opponent down, so you give the gym leader like three poisons good at sticking around and spreading damage with two non-poisons to help shore up the team's weakness. this creates a much more tactical encounter where you need to leverage more than the 2-3 pokemon that eat poison-types for breakfast. having special battle parameters would also be nice, ive seen some romhacks that will give a fire gym permanent sun to make each encounter play different from your regular one while also amping up the threat level. that's a bit much for how modern pokemon balances itself, but like, a psychic gym fight that has trick room active the whole match can really force a player out of their comfort zone and learn to improvise, whilst also teaching them how a perceived detriment, like low speed, can be converted to an advantage.
The problem with PvE doubles so far is that, for most games, it's fewer than 5 battles that use double mechanics.
frankly this is an issue that shouldn't exist, sv throws doubles-centric mechanics at you the whole game and the only required fights outside of dlc are the titan battles with arven (who you can't control), the scripted area zero battles (also with ai pokemon) and ryme's gym (whose feature battle has a pretty terrible gimmick that makes the fight way too feast or famine to have any sound strategy). like all they needed to do is add more double battles throughout the game so players understand "ah, this move may not be good in a 1v1, but has great upsides in a 2v2, so i should consider holding onto it when possible." the extremely lax relearner mechanics only applify this. getting you first party-wide (and ONLY) double battles by the 7th gym is a massive failure on the game's end, this should have been established after you've done like 3 questline fights, with multiple opportunities after.