Well, if Irish Troops weren't used as cannon/machine gun fodder during the Great War, that would definitely improve relations, I think.
I think you'll find that the Irish troops were never used as 'canon fodder', in as much as any other component of the Allied forces were on the Western Front. In fact, a high proportion were volunteers, the British army having a long tradition of soldiers recruited from both the north and south of Ireland (as it was then one political entity). In WWII, a quite large number of volunteers also joined the British army; unfortunately they were persecuted by the Irish goverment upon demobilisation, and this has only recently been recognised as a scandal by the present goverment.
Of course they were all volunteers, Conscription wasn't brought in to Ireland, the reasons why those soldiers volunteered are complex and varied, with the Ulster/UVF joining up to defend the Union, while the Southern Irish/IVF joined to protect the Home Rule Act. That the IVF soldiers weren't well received upon their return is based off the fact that they returned to the outbreak of the War of Independence and the utterly changed public view post Rising.
As for the WW2 situation that's a completely different situation and frankly you are mixing up to different groups. Those that went to the UK and joined up weren't punished if they returned to Ireland post War, it was members of the Irish Armed Forces that had volunteered to join the Irish forces and had given an Oath to the State, that then deserted to join the UK forces. They weren't punished for joining up they were punished for deserting during an Emergency/War, something I'm sure would have been punished in any other country as well.
The punishment itself was wrong/mishandled and something that only Dev would think about, to be legally correct they should have been arrested and charged under the military law for Deserting, hell survivors of those that remained in the Irish Forces argued that very point at the time of the State's Pardon, that if they wanted an apology they would have to face military justice for the offence of desertion at the same time.
Do you want to argue the Republic's policies during the war, fair enough, but at the same time you have to accept that deserting does carry consequences no matter how right the cause was. ?If they felt the overwhelming need to fight in WW2 they shouldn't joined the Irish Forces first.