I hesitated to use the term 'punishment' (hence why I placed it in quotes) as it implies a definite action as an act of retaliation.
To re-state (for what feels like the umpteenth time), we all have a path through life. Some people's paths gift them with riches, good health and success, others are gifted with hardships and ill health.
If we are gifted the former and act accordingly then we will continue on that path. If we are gifted the former and act inappropriately then our path will diverge to one which is 'less good'. Conversely, if we are gifted the latter and dwell in whatever negative situations we experience then we will continue on that path, whilst if we are gifted the latter and face our hardships head-on, maintaining humility and respect the our path will diverge to one which is 'more good'.
Using your example of an 'innocent' child, it is not a question of 'punishments' for 'crimes' but rather that the child had simply been gifted a path which was 'less good' from the outset.