The spell you cast is wish, the effect is that of a lower level spell.
This is Wish We're Talking About
You could cast wish, and wish to store a spell into the ring of storing, but that isn't just duplicating the effect of the spell, so there may be consequences:
You might be able to achieve something beyond the scope of the above examples. State your wish to the GM as precisely as possible. The GM has great latitude in ruling what occurs in such an instance; the greater the wish, the greater the likelihood that something goes wrong. This spell might simply fail, the effect you desire might only be partly achieved, or you might suffer some unforeseen consequence as a result of how you worded the wish.
The stress of casting this spell to produce any effect other than duplicating another spell weakens you. After enduring that stress, each time you cast a spell until you finish a long rest, you take 1d10 necrotic damage per level of that spell.
What your asking for isn't too big, consider you spent a 9th level slot for a <=5 level spell to go into an item made to hold spells of levels <= 5. So, the DM should be alright to try.