Praise be to Allah.
You must limit it to giving the chickens only the antibiotics that they need, because their bodies usually do not get rid of them before they are slaughtered, so humans may be harmed by eating them.
If there is a useful alternative the we should resort to it, such as using bacteria or herbs, and taking care of the eggs and the place where the eggs hatch, so as to reduce the need for antibiotics, and to avoid feed containing antibiotics.
The basic principle regarding that is the words of the Prophet (blessings and peace of Allah be upon him): “There should be neither harm nor reciprocating harm.” Narrated by Ahmad (2865) and Ibn Maajah (2341). Classed as saheeh by al-Albaani in Saheeh Ibn Maajah.
It is haraam to cause harm to the Muslims in their food or otherwise. Do you not see that the Prophet (blessings and peace of Allah be upon him) cursed the one who contaminates the roads of the Muslims and the places where they sit, so how about the one who contaminates their food and causes them physical harm? Ahmad (2715), Abu Dawood (26) and Ibn Maajah (328) narrated that the Messenger of Allah (blessings and peace of Allah be upon him) said: “Fear the three things which provoke curses: relieving oneself in the routes to water sources, in places of shade and in the middle of the street.”
Classed as hasan by al-Albaani in Saheeh Abi Dawood.
What you should do is avoid that which will cause harm to people, so do not give medicine to the chickens except when needed, and only as much as is needed.
Try to give them feed that is not mixed with any impurities, antibiotics or anything else that may harm human health, especially in the period just before they are sold or slaughtered.
And Allah knows best.