Question: Is there any Islamic bases to the idea that children should be kept indoors at the time of Magrib?
Answer: Yes there is an Islamic basses to this concept that children be kept indoor at the time of Magrib.
It is narrated in a Hadith from Sayyidina Jabir bin Abdullah Radiyallahu Anhu that the Messenger Sallallahu Alaihi Wasallam said;
إِذَا كَانَ جُنْحُ اللَّيْلِ أَوْ أَمْسَيْتُمْ فَكُفُّوا صِبْيَانَكُمْ ، فَإِنَّ الشَّيْطَانَ يَنْتَشِرُ حِينَئِذٍ ، فَإِذَا ذَهَبَ سَاعَةٌ مِنْ اللَّيْلِ فَخَلُّوهُمْ 
  رواه البخاري  ٣٢٨٠
“When the darkness of the night envelops, withhold your children (from going outside). Verily, the Shiyaateen and Jinn spread out at this time. Then, when part of the night has passed, you may let them go outside.” [Bukhari]
Nabi Sallallahu Alaihi Wasallam had immense compassion for this Ummah: He advised us about things that were beneficial and warned us about things that were harmful.
Notwithstanding the above, if at anytime there is a need for children to be outdoors at the time of Magrib they should be told to read the three Quls and blow on themselves. If they cannot read themselves, parents should read and blow on them.
And Allah Knows Best
Yusuf Moosagie 
Subscribe to  Daily Fiqh WhatsApp service by sending a message to +27 72 071 3684
Join the Daily Fiqh Telegram channel  https://t.me/DailyFiqh