This is a very loosely based design of a drop shaft hand brake for flat cars, the kind that were used on older equipment. The actual hand brake wheel can be found on this site as well from another creator, so I used this to kind of base the size off of.
The longer shaft goes from the brake wheel to where the ratchet release would be, then the shorter piece goes from that to the chain ratchet under the car edge. I designed it so that the two shafts could be glued inside the first ratchet release.
The ratchet release and lower ratchet can both be attached to the car. I recommend using a high infill for these parts, and a stronger plastic such as ABS.
I've attached a prototypical picture for use as a guide.