Your ideas are good, but I think with a little bit of math and empirical testing, you can figure out how to make these levels dynamically. You have a few factors that effect the placement of the blocks:
- How fast the character is running
- How long does it take to reach the minimum height to clear a box?
- How long does the character remain above the minimum height to clear a box?
- How long does it take for the character to touch the ground again and be ready to jump after one jump? This shouldn't be affected by the horizontal speed
- How long does it take to get below the minimum height to get under a box?)
With that information, you can figure out the following measurements:
A: How far apart two "paired" ground boxes can be placed. These are the boxes where the user is expected to jump late enough to clear two boxes. Calculated using the time above the minimum height to clear a box and the speed of the character.
B: How close together two ground boxes can be placed. Calculated using the speed of the character and the time it takes for a jump.
C: How close together a ground box -> air box pair can be. Where the character needs to jump over a box, then duck under the next box. Calculated by the time it takes to reach the minimum height to clear a box (because it'll be the same as the time it takes to clear a box and hit the ground) and the speed of the character.
D: How close together a air box -> ground box pair can be. Where the character needs to duck, then jump.
E: (Not pictured because I forgot) How close together two sky boxes can be. Calculated using the speed of the character and the time it takes to duck.
There will be some room for setting the difficulty here. You can make the jumps tight or loose depending on the difficulty. A tight jump would just barely clear the edges:
Where a loose jump would have much more play on either side of the boxes. That's where the empirical part comes in, you need to test and see how reasonable it is to get those jumps in with the input device you're using.