I basically did exactly this but was too slow about it, so I'm pretty sure it works.
The first part can be done much, much more easily with beempy's allow command.
allow -a targetaccount --permission active --weight 10 signingaccount
and then when you get to the last one add --threshold 40 after the weight. (Don't do it before or you won't be able to add new ones without the owner key or building a multisig transaction to do it.)
.
In fact I haven't been able to do it with the owner key; beempy crashes out with "Unnecessary signature(s) detected."