The story
Found as a popular saying from 1840 (See Parent's Monitor and Young People's Friend Volume 1, p. 47 https://www.google.com/books/edition/Parent_s_Monitor_and_Young_People_s_Frie/wv8XAQAAMAAJ?hl=en&gbpv=1&dq=%22hand+that+rocks+the+cradle+rules%22&pg=PA47&printsec=frontcover); made famous by a poem (1865) by William Ross Wallace.
Etymology from Wiktionary, CC BY-SA 4.0.