In the new testament, God will discipline his children with sickness and even death in order to save their souls. This type discipline is reserved for people who are saved.
Hebrews 12:7
New International Version
Endure hardship as discipline; God is treating you as his children. For what children are not disciplined by their father?
Sometimes God will discipline believers with death so that they are not condemned on the day of judgement.
1 Corinthians 11:30-32 New English Translation (NET Bible)
30 That is why many of you are weak and sick, and quite a few are dead.
31 But if we examined ourselves, we would not be judged. 32 But when we are judged by the Lord, we are disciplined so that we may not be condemned with the world.
Paul uses this discipline for a believer who had got into sexual immorality.
1 Corinthians 5:4-5 New English Translation (NET Bible)
4 When you gather together in the name of our Lord Jesus, and I am with you in spirit, along with the power of our Lord Jesus, 5 hand this man over to Satan for the destruction of the flesh, so that his spirit may be saved in the day of the Lord.
Even people who build upon the foundation of Christ for the wrong reasons, If they were saved, Jesus will destroy their works but save their spirits.
1 Corinthians 3
11 For no one can lay any foundation other than what is being laid, which is Jesus Christ. 12 If anyone builds on the foundation with gold, silver, precious stones, wood, hay, or straw, 13 each builder’s work will be plainly seen, for the Day will make it clear, because it will be revealed by fire. And the fire will test what kind of work each has done. 14 If what someone has built survives, he will receive a reward. 15 If someone’s work is burned up, he will suffer loss. He himself will be saved, but only as through fire.
So when Peter prophesied that the feet of the people who had carried Ananias were also going to carry Saphira, I believe based on the above scriptures that they merely suffered death as a discipline which would save their souls. The very fact that the people who had carried Ananias were now standing at the door to carry Saphira simply means that they all had seen how the Holy Spirit had dealt with Ananias and new that Saphira would follow the same fate.
Acts 5:3-5
3 But Peter said, “Ananias, why has Satan filled your heart to lie to the Holy Spirit and keep back for yourself part of the proceeds from the sale of the land? 4 Before it was sold, did it not belong to you? And when it was sold, was the money not at your disposal? How have you thought up this deed in your heart? You have not lied to people but to God!” 5 When Ananias heard these words he collapsed and died, and great fear gripped all who heard about it.