First of all, all day settlement systems of futures trading will require one party to add margin when the gap between the execution price of futures contracts and the spot price increases. In this topic, when the spot price drops, the buyer is required to increase the deposit, so the deposit will increase as the delivery date approaches.
Secondly, buying and selling futures contracts are contracts signed with futures exchanges. You have no idea who the buyer is. The futures exchange shall be the seller of all buyers and the buyer of all sellers. You won't make direct delivery with any market participants except the futures exchange. As long as the futures exchange exists, there is no need to worry about not being able to deliver. In fact, the exchange requires more margin to protect its own interests.
Answers to supplementary questions:
Delivery is done at the exchange, so it is at the exchange. The way the exchange guarantees others to perform the contract is the daily settlement system mentioned above. If your possible loss amount increases, the exchange will definitely ask you to add margin. If you don't add margin, the ownership of the transaction will force you to close your position. The deposit is to ensure that you can complete the delivery on time when you perform the contract. So the deposit will not be much less than the loss amount at the time of delivery.