What is the connection between poetry and humanism?
Humanism is belief system that focuses on human agency, self-actualization, rational thinking, and attention to human life. This is to be understood as a shift in focus on religion to humanity (although there were/are Christian humanists), or from institutional agency to human agency. Humanism, as an historical movement, emerged in the early to mid 19th century. Marxism was a humanist system in these senses; Marx focused on actual human life, the economics and politics of it. He determined that the worker has little to no agency and his philosophy of history (historical materialism) was designed around the worker eventually achieving agency.
Given that humanism focused on human agency, there was (and is today) a determination to be educated, to read and write well. Here is the first clear connection between humanism and poetry, that of the intelligence and literacy required to have agency.
During the humanism of the 19th century, look at some of the Romantics (England) and the Transcendentalists (America) as examples of poets who express humanist ideals. Whitman was a champion of individuality, singing his "Song of Myself." Emerson stressed self-reliance in the famous essay of the same name: "Self-Reliance." Wordsworth "wandered lonely as a cloud" and other Romantics in England contemplated nature and human nature, often in solitude. This stress on individual agency and imagination is a celebration of the self but does not mean that these thinkers/poets wanted to abandon society. On the contrary, in focusing on the self, one would be more critical (less brainwashed by institutions or old belief systems). For example, Wordsworth and Coleridge were much in favor of solitude and individual contemplation but they were also encouraged by the promise of societal changes; namely, democracy and the French Revolution - both aimed at liberating humanity.