Maybe it's possible to create such system, but for now I engaged in the long time-consuming task to
make copies of each unit, add edited berserk upgrade on it, add these copies to the buildings that train them and enbale/disable them when you upgrade all units' build time, with teh help of unit-type arrays.