Can the story of Hatib be used as evidence to show whether or not allying with the disbelievers is kufr or not is dependent upon intention?

Ustadh AbdulAziz al-Haqqan
It is reported by al-Bazzār, al-Hākim, and al-Ḍiyāʾ from his (the Companion’s) statement: “My family were among them, and I feared that they might be harmed, so I said: I will write a letter that will not harm Allah or His Messenger.” For this reason, al-Ḥāfiẓ (Ibn Ḥajar) said in Fatḥ al-Bārī (8/634): “He called him a hypocrite because he concealed what was contrary to what he showed outwardly. As for Ḥāṭib’s excuse, it is what he mentioned himself — that he did what he did out of interpretation (taʾwīl), believing that there would be no harm in it.”