Here Paul emphasizes how close the relationship is with the Christians in Philippi. He holds them all(!) in his heart. The partners in the gospel (Philippians 1:5) are also partakers in the grace that Paul received. By grace
Paul does not mean undeserved gifts such as redemption and the bond with Christ, but that he may be a proclaimer of the gospel. In other letters, too, he calls his apostleship such a gift (grace) from God (e.g., Romans 1:5; 1 Corinthians 3:10, Ephesians 3:2).
Perhaps Paul is referring here to his captivity by grace.
After all, he mentions it. Compare this with Philippians 1:29 where he uses a word for grace in connection with the suffering of the Philippians.
It is clear that the Christians in Philippi are not helping a pitiable prisoner, but an apostle who has received the grace to continue spreading the gospel as a prisoner. Through the help they give Paul, they cooperate with him in the defense and confirmation of the gospel. These words are reminiscent of a lawsuit. This is not about Paul’s lawsuit, but about the gospel that Paul had to defend. The gospel was also confirmed: it stood strong.
7 It is right for me to feel this way about you all, because I hold you in my heart, for you are all partakers with me of grace, both in my imprisonment and in the defense and confirmation of the gospel.