Egypt is like a type of the world. Pharaoh is a type of Satan. We can live in the world and live in slavery. And yes, Egypt is a type of the tree of knowledge. For instance, remember the temptation of Eve and what she saw? Good for food, good for looking at, and desiring to make one wise. These are the things that are in the world according to 1st John. (I touched lightly on this in the OP.)Now on to something else that struck me in the forehead when reading what you shared.
I slept on it and still have the will to share this here:
I have always seen Egypt in scripture and even in NT letters and writings as symbolic of the arms/strength of the Gentile nations and or their leadership/rulers when God is speaking prophetically to Israel (I get that through topical studies also).
And then ask:
So or but me knowing that God presents Egypt as a "tree" in Ezek 30 and beyond, does that bring any thoughts to you to bring you to in anyway also relate the Gentiles as being somehow related to the forbidden "tree" in the garden in Genesis because He also symbolically relates the nation of Egypt to the arms/power/strength of the Gentile or Gentile nations when speaking prophetically to the nation and/or leadership of Israel ?
So Egypt is like the tree of knowledge because it is the world! The Lord longs to save us and take us out of the world in that he delivers us from slavery to the lust of the flesh, the lust of the eye, and the boastful pride of life. (All sin is rooted in these three things, IMO.) It is these things that enables Pharaoh to have power over us. Then we wonder in a desert learning about God. Learning how he provides and being tested and humbled. Finally, the Lord longs to take us into a promised land where we begin to conquer the Jericho stronghold in our life (lust, or anger, or materialism or whatever it may be). Then we go on to Ai. And while in that land, we eat of the fruit of the land. When we are fully set free from the world and it's strongholds there is genuine peace of God.
Not sure if I was clear or not. But I hope it addresses enough that we can continue our conversation if needed.