Contributions to a 529 plan are not deductible at the federal level, the tax advantage is that earnings in a 529 are not taxed if used for qualified education expenses. So, there would be no point in contributing and withdrawing immediately unless your state happens to have a 529 deduction.
Iowa happens to be a state that does have a 529 plan deduction, if you are enrolled in one of Iowa's plans:
Iowa taxpayers who are Participants can deduct up to $3,319 for 2018
(adjusted annually for inflation) of their contributions per
Beneficiary, including rollovers, in determining their adjusted gross
income for Iowa income tax purposes. This deduction applies to each
Beneficiary account they own and contribute to. For example, married
Participants who contribute to separate accounts on behalf of their
two children can deduct up to $13,276 (4 x $3,319) in 2018. **
I've read that some state deductions are based on the net, so a contribution and withdrawal in same year for same amount would negate any deduction, but I do not see any indication that this is the case for Iowa.
From the IRS perspective, the expenses being paid in January and reimbursed in December
of the same calendar year is not problematic, there may be rules specific to your plan that cause a problem for you.
The only certain hitch is that contributions aren't available for withdrawal immediately, you'd need a minimum of 7 business days:
If you make a contribution by check, recurring contribution or
electronic bank transfer, the money will be available for withdrawal
after 7 business days.