After upgrading to SCCM 2107 (5.00.9058.1000), computers will randomly hang on one of the Install Applications steps in the OSD task sequence. Very seldom is it the same application. Several computers will finish successful, but a handful randomly fail. We tried switching from Applications to Packages following a recommendation from an old forum discussion, but it didn't help. The failed applications always have the same error:
The task sequence execution engine failed executing the action (Install Sophos) in the group (Install Applications) with the error code 2278556181
Action output: ... oftwareJobID_P0200436_P022016A_Silent'='{02E99C58-CBD6-493B-965B-63F917DBEFCE}'
Waiting for installation job to complete..
Waiting for job status notification...
TS::Utility::GetCcmExecPid(dwServerPid), HRESULT=87d00215 (X:\bt\1204713\repo\src\client\OsDeployment\InstallSoftware\installsoftware.cpp,838)
IsServerConnected(bConnected), HRESULT=87d00215 (X:\bt\1204713\repo\src\client\OsDeployment\InstallSoftware\installsoftware.cpp,903)
WaitforJobCompletion(spExecReqMgr), HRESULT=87d00215 (X:\bt\1204713\repo\src\client\OsDeployment\InstallSoftware\installsoftware.cpp,808)
ReleaseSource() for C:\_SMSTaskSequence\Packages\P0200436.
reference count 1 for the source C:\_SMSTaskSequence\Packages\P0200436 before releasing
Released the resolved source C:\_SMSTaskSequence\Packages\P0200436
pInstall->Install(sPackageID, sProgramName), HRESULT=87d00215 (X:\bt\1204713\repo\src\client\OsDeployment\InstallSoftware\main.cpp,383)
The SMS client service is not running.
Install Software failed, hr=0x87d00215.
Here is a snippet of the TS. We added a reboot half way through the list of applications to see if it helps. We also tried adding a reboot before Install Applications, but it didn't help. We are using ConfigMgr client 5.00.9058.1018.

Any recommendations would be appreciated?
The task sequence execution engine failed executing the action (Install Sophos) in the group (Install Applications) with the error code 2278556181
Action output: ... oftwareJobID_P0200436_P022016A_Silent'='{02E99C58-CBD6-493B-965B-63F917DBEFCE}'
Waiting for installation job to complete..
Waiting for job status notification...
TS::Utility::GetCcmExecPid(dwServerPid), HRESULT=87d00215 (X:\bt\1204713\repo\src\client\OsDeployment\InstallSoftware\installsoftware.cpp,838)
IsServerConnected(bConnected), HRESULT=87d00215 (X:\bt\1204713\repo\src\client\OsDeployment\InstallSoftware\installsoftware.cpp,903)
WaitforJobCompletion(spExecReqMgr), HRESULT=87d00215 (X:\bt\1204713\repo\src\client\OsDeployment\InstallSoftware\installsoftware.cpp,808)
ReleaseSource() for C:\_SMSTaskSequence\Packages\P0200436.
reference count 1 for the source C:\_SMSTaskSequence\Packages\P0200436 before releasing
Released the resolved source C:\_SMSTaskSequence\Packages\P0200436
pInstall->Install(sPackageID, sProgramName), HRESULT=87d00215 (X:\bt\1204713\repo\src\client\OsDeployment\InstallSoftware\main.cpp,383)
The SMS client service is not running.
Install Software failed, hr=0x87d00215.
Here is a snippet of the TS. We added a reboot half way through the list of applications to see if it helps. We also tried adding a reboot before Install Applications, but it didn't help. We are using ConfigMgr client 5.00.9058.1018.

Any recommendations would be appreciated?