Trench filling with phosphorus-doped monocrystalline and polycrystalline silicon