The three brothers and their destinations are assumed for the purposes of argument. The exchange is not a revelation of the unseen fate of a particular child. Its object is to test whether a general principle remains consistent when applied to different cases.
The value of a hypothetical depends upon its explicit premises; change those premises and the conclusion may change. “God must produce the maximally beneficial outcome for everyone” differs from “God acts with grace and wisdom.” The first includes a specific claim of obligation that the second does not entail.
Once that logical distinction is established, the narrations and theological positions about the death of children must be considered separately.