Would you give a four-year old child midazolam in order to have his cavity filled?

At the hospital. Midazolam is safe when the child is being monitored. Sedation in a child may be unexpectedly problematic. In my view, pediatric sedation should only be performed in the hospital with full monitoring and emergency staff and equipment.
Personally, No, Although I know several other pediatric dentists who do. If I have a healthy child in my practice who requires sedation I have a board qualified anesthesiologist, who is an expert in child sedation for dental procedures, come to the office for that particular child. If the child has any medical issues then we treat them in the operating room at the local hospital.