I'll go a stronger and say no, it disqualifies the plan. The plan document should have language saying how the gain/losses are allocated. The formula used also means that terminated participants with balances do not get an allocation of gains/losses.
It's not one of my TPA's plans-- he's just asking. I told him it should be done based on beg balances-- why would you give someone gains/loss when they have no balance?
If the plan consists of only deferrals and safe harbor contributions, the plan is exempt from a top heavy contribution.
Yes, you can allocate the safe harbor on part comp if the plan is written as part comp.