Dear Chadiga,
Salamun Alaikum.
I am quite confused / surprised with the translation you have offered as I cannot see any of the highlighted parts in red in the Arabic of the Quran.
27:20
And he reviewed the birds, to see the hoopoe — which would locate water beneath the ground and indicate its location by pecking at it, whereupon the devils would extract it, for Solomon required it for when he prayed; but he could not see him — then he said, ‘Why is it that I do not see the hoopoe?, in other words, is there something preventing me from seeing him? Or is he among the absent?, and so I cannot see him because he is absent?’ And when he became certain [of the hoopoe’s absence],
27.21
He said, ‘Assuredly I will chastise him with a severe chastisement, by having [all] his feathers as well as his tail plucked and leaving him out in the sun, where he would not be able to escape from reptiles, or I will slaughter him, by slitting his throat, unless he brings me (read la-ya’tiyannī or la-ya’tinannī) a clear warrant’, plain manifest proof for his [having a valid] excuse.
Is this an attempted translation or an interpretation by the author? If this is an attempted translation, then this is quite simply 'terrible' as you will agree.
A closer translation of the Arabic would be...
027.020
"And he inspected / reviewed (tafaqqada) the birds and he said: "Why do I not see the Hoopoe? Or is he among the absent?"
027.021
"I will most certainly punish him with a severe punishment, or kill him unless he brings me a clear reason"
To me, it clearly shows the power of a commander and his authority (Prophet Solomon). Also the Hoopoe was not like the ants. The Hoopoe was part of Prophet Solomon's formidable army and under his authority / leadership. Given that the Hoopoe was singled out, it seems this particular Hoopoe had an important position in the army. Disobedience to a leader / head of state can be seen as an act of treason. In this case, such disobedience as going AWOL, absconding, or defecting would not go unpunished and was expressed as death.
'Tafaqqada' in Arabic means to inquire or to search out things lost or possibly missed, at times repeatedly.
For me, this only highlights the importance of this particular 'Hoopoe' as Prophet Solomon repeatedly searched for him. Therefore, the Hoopoe could be a leader of the birds or one whose importance to the army was significant.
If an important general of an army becomes absent without leave (AWOL), then there has to be a very good excuse, let alone the possibility of him absconding / defecting to join another party.
Given the Hoopoe's importance, this then gives the 'testimony' of the Hoopoe even greater credibility in the Quran and one can sense why Prophet Solomon took his testimony regarding Sheba (Saba) so seriously and acted on it by sending Sheba (Saba) a message.
Otherwise, one could potentially question how a Prophet could rely on a simple bird's testimony? This was no simple bird, but rather seemingly, one of great importance.
Every word, every verse in Arabic has succinct relevance with multiple layers to unravel. We must try to stay as close to the Arabic as possible and then try to ponder on the layers of wisdom of what the text reveals.
I hope that helps, God willing
Joseph.