Good STOL performance is directly linked to how slowly an aircraft can fly and how quickly it can accelerate and decelerate when on the ground.
Low wing loading (a lot of wing for a given aircraft weight) with a lot of camber is the primary means for attaining slow flight. It is not used for every aircraft because a big, cambered wing creates more drag than a small wing, which limits top speed. Flaps and slats can help by modifying the shape of the wing to provide more lift when flying slowly while keeping drag low when retracted for top speed. These add complexity and weight so they are used by aircraft needing speed.
Rapid acceleration requires power, which costs money and is heavy. You pick how much you want. Rapid deceleration usually depends on brakes. It is limited by friction between tires and ground, and sometimes by aircraft configuration. Most every aircraft has brakes strong enough to make a tire skid.
Google "valdez stol competition" to see the world's shortest takeoffs and landings. These guys practice a lot, and you can see some of them nearly flip onto their noses by how hard they brake.