Yes, this is OK. Making our children conscious of the Day of Judgment in a positive way is good for them.

Is it right to tell the child who is between 6 to 7 years old that before deciding to do anything he/she should think that one day he/she will stand in front of Allah Taala and be judged for the deeds done?