I've constructed a couple of square aluminum tubing "structures," of relatively small overall size, but subjected to forces applicable to this project.
Rivets will indeed loosen, but combining an adhesive such as epoxy with rivets will provide for durability. Should replacement be required, drilling out the rivet will allow a hammer blow to release the epoxy.
That method was successful for one project, but for another, I used rivnuts and bolts.
I had to drill "access holes" in the bolt-side tubing, as I wanted the bolt heads to be within the tubing. If one is going to use a full length through-bolt, one would want an inner bushing/sleeve to transfer the load from the head of the bolt to the inner tubing wall and prevent crushing of the tubing.
Installation of the rivnut should be done correctly. As noted in the linked article below, oversize holes are problematic. Stripping the internal threads is easily done with aluminum inserts.
The images are from the linked site. The image above appears to have been the result of an oversize hole, as the bulbed part of the rivnut is flush with the underside of the head. Another aspect of the linked article is the suggestion to use the correct tools. With a project of this size (fence/gate), it is a wise suggestion.
In researching for photos for this answer, I found a website that references both rivnuts and plus-nuts, a product of which I was unaware until now.
It's easy to see why this product is called a plus-nut. More expensive, but with greater holding power, according to the linked article. The article suggests that it is more tolerant of oversize holes, but that falls back to the "use the right tool" reference.