This is similar to what I did a few years ago. I needed dirt for the back of a building foundation I was constructing, so I dug up the hard clay from 10ft down and used it to level the foundation which sat on a bit of a hill. At the end, I was left with a fairly steep slope of ground on which nothing would grow except some ragweed, pokeweed, and some briars. So I dug out holes like what you're suggesting and filled them with decent soil, then planted strawberries. I didn't use any pipes. Its been 3 years and the strawberries are doing great. On the eastern side, the strawberries have completely filled in with dense vegetation. On the south and western sides, not as much, but they are spreading some. I'm not sure if there is a difference in the dirt from the east to the south or if the strawberries like morning sun rather than evening sun.
So, I think what you're doing is a great idea, but I don't see much need for the pipes. If you want to measure drainage, you could dig the 40cm hole then fill with water and see how fast it drains. I think you'd be surprised. I think 40cm is a good depth, but I would make the diameter a little larger.
Edit in reply to comment:
Roots typically look like this and can go wider and deeper than you would guess:

Roots don't absolutely have to go that wide or deep, I'm just pointing out that they can if the soil permits.
I made the holes about the size of a flower pot... maybe 30cm across and about that deep. The bigger you make the holes and the more good soil you add, the better the plants will grow. The strawberries send out "daughter" plants about 30-50cm away from the mother.
Like this:


Wouldn't you like your hill to look like this:


I thought strawberries would make a good ground cover, but I like your Rosemary idea too.