Put these under each corner of the top shelf. They will be out of site but provide the support you need. This one is from Lowes, but I assume you can get them at any hardware store. I believe you can get them in black as well, just did a quick search and pic to give you an idea. Main thing is to allow attachment to wood and a way to lock onto pipe, should take out all the wobble and pull the top upto the end caps for a better look.
https://www.lowes.com/pd/SteelTek-3-4-in-Silver-Galvanized-Steel-Structural-Pipe-Fitting-Floor-Flange/999930950
Addon: You could also go this route, good deal on Amazon for a 10 pack, just put them on all the underside shelf holes, should tighten it up pretty good, even the correct pipe size. Not sure if the ones I mentioned above come in 1" size

