that is an interesting parrallel yes BUT the only thing about that is that that predates any of his illumination - so it doesn't necessarily have a central place in the narrative. it's more of a cautionary tale.
he got fucked up like that meditating in a cave for six years. went for a wash in a river and was so weak he couldn't get out. is discovered by the maid sujata who gives him rice milk - he recovers then BOOM. figures out the middle way.
when i was in bihar i went to the cave where he got that skinny! - his ascetic phase - in the dungeshwari hills. it's very weird that you can walk into the actual space and sit in it. i mean this predates the virgin birth and crucifixion and where are those places? here's one of the photos i took: