Onuora, now temporarily in charge at Gillingham, watched in horror as Swindon went two goals up in the first six minutes on their way to what could have been a real drubbing.
Only some bad misses by the Swindon strikers and some sound goalkeeping by Simon Royce kept the scoring to single figures.
Cox and Paynter also each hit the woodwork as Swindon deserved their standing ovation from delighted fans at the final whistle.
Swindon never looked back from when Jon-Paul McGovern put them ahead in the fourth minute after slicing through a non-existent defence.
Cox, on loan from Reading until January, swivelled to shoot in the second after six minutes and there was another blow for Gillingham when their experienced Trinidad international defender Ian Cox had to be replaced with concussion.
Swindon had to wait until the 52nd minute to score again when Paynter - a summer signing from Southend - burst through some poor tackling to shoot past the unprotected Royce.
Cox added the fourth on 62 minutes and Paynter made it five for the season when he added Swindon's last goal with six minutes remaining.
Gillingham offered little resistance after the early setbacks and were fortunate when Paynter blazed wide with unmarked team-mates awaiting the pass.
Gillingham's best chances fell to Barry Cogan in the 53rd minute with a shot which went narrowly wide and in the 76th minute when Swindon substitute Michael Pook cleared off the line from Delroy Facey.
Royce, with his defence in pieces in front of him, made an excellent save near the end from Craig Easton, but Swindon failed to take advantage of enough chances to have won by a far bigger margin.