This verse is found in the Sundarkanda, Doha 58, Verse 3 of Ramcharitmanas of Tulsidas.
First thing first. This is said not by Lord Rama. This is told by the Ocean.
The second thing, "taran" does not mean physical beating. Women are highly respected in Hindu Society. No Hindu scripture says all women deserve beating as your translation suggests. On the contrary, you will find so many verses in Hindu scriptures that say never physically beat a woman. So your translation is wrong as it is not consistent with the Hindu views of life.
Also, you must understand that we use figurative speeches a lot. If a wife says to her husband - I made this dish with lots of love that does not mean that love is an ingredient of that dish. You cannot understand the real meaning of a word in isolation, you have to understand it in that specific context. This is especially so if you are reading poetry. When reading poetry, you must also read between the lines!
What the verse means is the following. This translation is from Gita Press Edition.
The god presiding over the ocean clasped the Lord's feet in dismay. "Forgive, my lord, all my faults. Ether, air, fire, water and earth - all these, my lord, are dull by nature. It is Maya (Cosmic Nature) which brought them forth for the purpose of creation under an impulse from You; so declare all the scriptures. One would attain happiness in life only by remaining where he has been placed by the Lord. My Lord has done well in giving me a lesson; but You have fixed certain limits for everyone. A drum, a rustic, a Sudra, a beast and a woman - all these deserve instructions. By the Lord's glory I shall be dried up and the army will cross over; but this will bring no credit to me. Your command, however is inviolable; thus declare the Vedas, I shall do at once what pleases You."
As you see what the ocean tried to convey is that he initially did not allow Rama to cross the ocean because he is dull. He needed instruction like all dull person needs to comprehend something and do it properly as required. In that context, to make his position relatable he gave that metaphor. Yes, a metaphor, nothing more than that.
Even if you see the meaning of tarana in isolation, it could mean thrashing, as well as admonition etc. Not just thrashing. Depending on the context, it could be thrashing or admonition etc.