Does the Catholic Church consider the 40 year trek in the wilderness an allegory? Much of the story about the Israelites 40 year wandering in the desert wilderness is as hard to believe as the flood in Noah's day and the allegorical creation account in Genesis.

Does the Catholic Church take all of the events in the account of the wilderness trek (manna, quail, copper serpent, sandals and clothes that don't wear out etc...) as literal or is it another allegory that is meant to teach us that we must rely on God for salvation?

If taken as literal were they made ignorant by God so as not to be able to find their way? In 40 years walking in a straight line how many times could one circle the globe? Walking 20 miles a day one could theoretically walk around the globe in 3.5 years in 40 years nearly 12 laps around the equator
The Catholic Church teaches that [a]ccording to an ancient tradition, one can distinguish between two senses of Scripture: the literal and the spiritual, the latter being subdivided into the allegorical, moral and anagogical senses. [Cf. CCC 115]. The next point CCC 116 goes on to say that [t]he literal sense is the meaning conveyed by the words of Scripture and discovered by exegesis, following the rules of sound interpretation: "All other senses of Sacred Scripture are based on the literal." [St. Thomas Aquinas, STh I, 1, 10, ad I.]. Cf. also this @Geremia's answer.

Therefore according to the Church's rules for biblical interpretation, one always starts with the literal sense and all the other senses are based on it.

I haven't seen anything in Catholic circles that considers the 40 year trek in the wilderness [as] an allegory. Of course the Church considers the Old as a type of the New in which the Old is revealed and fulfilled. Cf. This answer for a Catholic understanding of the Temptation of Jesus in Mt 4:1-11 as contrasted with Israel: Matthew uses this episode of the temptations in the wilderness to depict Jesus as the new Israel, in contrast to the old. Jesus is tempted, as Moses and the chosen people were in their forty-year pilgrimage in the wilderness. The Israelite yielded to temptation [while Jesus did not]. [...]. And from this article Lesson Four: On the Way to the Promised Land | St. Paul Center in the section III. The Making of the Old Covenant B. Testing in the Wilderness:


  Paul also said that we should read the account of Israel’s testing in
  the wilderness "as an example…written down as a warning to us, upon
  whom the end of the ages has come" (1 Corinthians 10:11).


Further Reading


Pontifical Biblical Commission - Documents.