How to fasten rotating pieces without self-tightening (or loosening)?
The bolt/nut configuration you show requires high friction against the joined members to maintain tightness.

You need independent locking of the nut. The most common method is to use two nuts. They are tightened against each other, rather than the captured articulating part.

An alternative is to use a nut locking compound (a sort of nut glue), and not fully tightening the nut, but the removable type will probably also eventually loosen, and the permanent type prevents easy disassembly.

I would also add a washer between the articulating arms or rotating parts.