Retirement tax questions

So the grey answer is, whether or not a parent can pay their child to do chores.  Some

people say it’s counted as earned income and keep a log of the activities and payment.  But if a neighbor pays my child cash for walking the dog, that is fine?  It shouldn’t matter if cash comes from neighbor or parent.  Teaching a child payment for work is a good thing either way.