From the question I assume that the model looks essentially like this:

To my surprise I managed to create a database (MySql, see DDL below, and please verify!) that propagated the CustomerID via forein keys into the shipmentItem (attribute Customer_ID_Shipment). My surprise was that this attribute can be used in both the FK to OrderItem (where it is the CustomerID of the Order) as in the FK to Shipment (where it is the CustomeID of Shipment).
However I would not do it that way: I am sure that the IT-system where the problem arises has a reasonable architecture meaning that there will be one piece (or very few pieces) of logic responsible for the "SQL insert" and the "SQL update" (e.g. in OO exactly one class "shipment"). I would simply code the necessary constraint there – typically there are other business rules that are difficult to express and maintain in SQL and easy in "code".
Here is the DDL:
/* ---------------------------------------------------- */
/* Generated by Enterprise Architect Version 12.1 */
/* Created On : 24-Nov-2019 11:02:14 */
/* DBMS : MySql */
/* ---------------------------------------------------- */
SET FOREIGN_KEY_CHECKS=0
;
/* Create Tables */
CREATE TABLE `Customer`
(
`Name` CHAR(10) NULL,
`CustomerID` INTEGER NOT NULL,
`Number` INTEGER NOT NULL,
CONSTRAINT `PK_Customer` PRIMARY KEY (`CustomerID` ASC)
)
;
CREATE TABLE `Order`
(
`OrderNumber` INTEGER NOT NULL,
`OrderID` INTEGER NOT NULL,
`CustomerID` INTEGER NOT NULL,
CONSTRAINT `PK_Order` PRIMARY KEY (`CustomerID` ASC, `OrderNumber` ASC)
)
;
CREATE TABLE `OrderItem`
(
`OrderNumber` INTEGER NOT NULL,
`ProductID` INTEGER NOT NULL,
`OrderItemNumber` INTEGER NOT NULL,
`CustomerID` INTEGER NOT NULL,
CONSTRAINT `PK_OrderItem` PRIMARY KEY (`CustomerID` ASC, `OrderNumber` ASC, `OrderItemNumber` ASC)
)
;
CREATE TABLE `Product`
(
`Name` char NULL,
`ProductID` INTEGER NOT NULL,
CONSTRAINT `PK_Product` PRIMARY KEY (`ProductID` ASC)
)
;
CREATE TABLE `Shipment`
(
`ShipmentID` INTEGER NOT NULL,
`CustomerID` INTEGER NOT NULL,
CONSTRAINT `PK_Shipment` PRIMARY KEY (`ShipmentID` ASC, `CustomerID` ASC)
)
;
CREATE TABLE `ShipmentItem`
(
`ShipmentID` INTEGER NULL,
`CustomerID_Shipment` INTEGER NULL,
`OrderNumber` INTEGER NULL,
`OrderItemNumber` INTEGER NULL
)
;
/* Create Primary Keys, Indexes, Uniques, Checks */
ALTER TABLE `Order`
ADD INDEX `IXFK_Order_Customer` (`CustomerID` ASC)
;
ALTER TABLE `OrderItem`
ADD INDEX `IXFK_OrderItem_Order` (`CustomerID` ASC, `OrderNumber` ASC)
;
ALTER TABLE `ShipmentItem`
ADD INDEX `IXFK_ShipmentItem_OrderItem` (`CustomerID_Shipment` ASC, `OrderNumber` ASC, `OrderItemNumber` ASC)
;
/* Create Foreign Key Constraints */
ALTER TABLE `Order`
ADD CONSTRAINT `FK_Order_Customer`
FOREIGN KEY (`CustomerID`) REFERENCES `Customer` (`CustomerID`) ON DELETE Restrict ON UPDATE Restrict
;
ALTER TABLE `OrderItem`
ADD CONSTRAINT `FK_OrderItem_Order`
FOREIGN KEY (`CustomerID`, `OrderNumber`) REFERENCES `Order` (`CustomerID`,`OrderNumber`) ON DELETE Restrict ON UPDATE Restrict
;
ALTER TABLE `OrderItem`
ADD CONSTRAINT `FK_OrderItem_Product`
FOREIGN KEY (`ProductID`) REFERENCES `Product` (`ProductID`) ON DELETE No Action ON UPDATE No Action
;
ALTER TABLE `Shipment`
ADD CONSTRAINT `FK_Shipment_Customer`
FOREIGN KEY (`CustomerID`) REFERENCES `Customer` (`CustomerID`) ON DELETE No Action ON UPDATE No Action
;
ALTER TABLE `ShipmentItem`
ADD CONSTRAINT `FK_ShipmentItem_OrderItem`
FOREIGN KEY (`CustomerID_Shipment`, `OrderNumber`, `OrderItemNumber`) REFERENCES `OrderItem` (`CustomerID`,`OrderNumber`,`OrderItemNumber`) ON DELETE Restrict ON UPDATE Restrict
;
ALTER TABLE `ShipmentItem`
ADD CONSTRAINT `FK_ShipmentItem_Shipment`
FOREIGN KEY (`ShipmentID`, `CustomerID_Shipment`) REFERENCES `Shipment` (`ShipmentID`,`CustomerID`) ON DELETE Restrict ON UPDATE Restrict
;
SET FOREIGN_KEY_CHECKS=1
;