That's possible to do if you have few participants. Just presign a bunch of transactions, or use CTV and whatnot.
But what else would that contract be able to do? Just keep the money still?
Because if you want people to be able to use the funds or move them in any way then it quickly becomes impossible. It's all the "payment pool" or "coinpools" idea again, a very flawed idea.