Though Jesus was not born rich, His family on both sides were not poor. His Mother was related (first cousins, IIRC) to a man who owned lead mines and smelting plants. Joseph, His adopting Father, was part of a land owning family, and of course His adopting Father remained in the family and taught Him the craft of carpentry. Joseph worked for a living and supported his family.
And “carpenter” is not really accurate. “Builder” is more like it. Joseph, and Jesus, very likely built more houses than furniture.