The title really just says what I’m wondering
I don’t think this would be a problem, however, I would suggest checking out Loomian Legacy (they have done something similar to this).
I think you’ll be fine as long as there are again no assets stolen whatsoever. I’d recommend changing up the gameplay (in some way) in order to be more unique to avoid any issues with copyrighting game-play. Games like Loomian Legacy exists so it should be fine (Loomian Legacy’s creator previously created Pokemon Brick Bronze 2 which was taken down for DMCA, they now have their own pocket-monster game).
As long as you don’t use any of the same names or assets, you should be fine and shouldn’t get in trouble with them.
If the game uses no assets that are (c) Nintendo, does not infringe on names and terms ™ Nintendo, does not use any Pokemon imagery (such as the Pokeball) and is not obviously copying the Pokemon games, such as having the exact same combat mode, e.g. with the player on one corner of the screen, the opponent on the opposite corner and the menu-based combat isn’t obviously intentionally similar, then you’re in the clear.
I know that Monster and Me and Eudemons Online also had/have persistent carryable pets, and they have been online for a decade/decades without attention from Nintendo.
You can likely even get away with having the above mentioned battle layout. As long as you’re doing it in good faith and not infringing on something that’s straight-up registered somewhere, you’re good.