Unless Kakuna knows an attack move or holds a damaging held item, this battle will drag out for a really long time and will only result in a Pokémon dealing damage if Weedle uses an attack move on Kakuna or either Pokémon uses Struggle.
For your strategy: I'd recommend giving Kakuna a Rocky Helmet and teaching it an attack move (a quick look at its gen 7 Sun/Moon learnset page reveals that the move relearner is the only way it could possibly learn an attack move barring a hack in Sun and Moon).
Weedle's attack moves are all physical, so a Rocky Helmet will slowly deplete HP every turn it attacks. If you're lucky enough for Kakuna to have a move available via the relearner, this will help a lot.
Also, like CoolMan said, accessing Ultra Sun or Ultra Moon to teach Kakuna Electroweb would greatly boost your offensive capability. Keep in mind that Weedle may also take advantage of Electroweb, which is a special move and therefore won't be affected by a Rocky Helmet.
Source: This Database