Precision and control for hands and feet begin with clear, stable motion. Hand technique and foot technique depend first of all on good control. There are many exercises for developing it. One of them is a rhythmic pyramid built from : two bars each of quarter notes, eighth notes, eighth-note triplets, sixteenth notes, and quintuplets, as shown in the video.
You can continue the sequence with sixteenth-note triplets, septuplets, and thirty-second notes. Ideally, after the smallest subdivision you can play without stopping, go back down through the pyramid in reverse. This can be practiced with hands or feet. There are two basic versions: one where the primary flam stroke stays in the same hand, and another using an alternating principle, where the lead hand changes according to the sticking.