Correct you can't put 40A PV breaker in existing panel, only 20A, if busbar in panel is 100A. Try to find out if that is 100A or 125A busbar. If 125A, then you can install 40A PV breaker.
Because sub panel has 100A breaker and meter box has 100A breaker, you can do everything without needing utility to shut off power (yank meter).
It would work to just splice a branch to PV, although as Zany says there are rules regarding a wire with excess power available on it's input, protected by breaker at far end.
I'm not personally concerned about that at all in this case, because the unlimited power from grid is protected with 100A OCP at meter. I'm not worried about 100A + 40A available to a 100A wire with 100A protection at far end because:
1) If the wire shorts out, it will fast trip the breakers feeding it.
2) If excessive load is applied at the sub panel, it will trip the 100A main breaker on the sub panel.
Only concern is being allowed to do it or not.
As Zany said and one of my suggestions was, Install a 125A or larger panel (main lug is fine.) Install 100A branch circuit breaker and move the sub panel feed wires over to that breaker. Install new wires feeding 125A panel from 100A main breaker in meter box. Install up to 50A of PV breakers at far end of the 125A panel.
If you want or are required to have a visible blade disconnect, it can be placed after the single 50A PV breaker. If you have multiple Enphase circuits, you'll need additional PV aggregator panel or fuses for them. (If two 25A breaker for two PV circuits, I'd be tempted to have switch break L1 of one circuit and L2 of the other. Likely not proper, but it would work.)
Or switch could be placed before the 125A panel (needs to be 100A switch), but then if shut off it shuts off the house.
Eventually I will upgrade my service and my breaker panel and feeders to 200a but for now I am looking for the simplest, code compliant way to connect my PV to the grid. The Enphase IQ combiner box and the AC disconnect will be mounted outdoors next to the service entrance. To me, if I could use the Polaris line splices to tap into the wires going from the first breaker in the service entrance to my breaker panel - that seems the simplest.
Have I got a deal for you!
Install a 225A busbar main lug panel beside the existing panel. Leave room above to install a meter box, but keep the B-hub cap on top for now.
Using 2" conduit and Tee, connect bottom of existing service entrance box to bottom of 225A box, and continue with Tee for PV circuit. Always leave a Tee with unused branch for further expansion.
Move existing 100A circuit to a 100A breaker in 225A box.
Feed main lugs of 225A box from service entrance.
Install up to 70A PV breaker at bottom of 225A box.
In the future, you can install meter and weather head above 225A box, install 200A main breaker, and 120% rule allows 70A PV.
The nice thing about 70A is it allows 56A continuous to feed through a hybrid or battery inverter and supply protected loads.
Well behaved Rule-21 PV inverters can AC couple with such battery inverter. (Enphase IQ8 is not well behaved.)
If you do use IQ8, likely have to go with Enphase ecosystem battery inverter. People here have had better luck AC coupling to IQ7. I favor high voltage string inverters, although those now require PV module level power electronics for RSD, which microinverters do not.
Take a look at Sunny Boy Smart Energy, which will be available in January. It outputs 7.7kW AC, can take in up to 15kW of PV, charges optional HV battery from BYD with up to 10kW. At this time only offered for time shifting power, not for grid backup (except for 120V 15A Secure Power.) I expect SMA to offer external transfer switch & auto-transformer in the future for full backup. It is mentioned for the European model and has been available for other products.
Instead of main panel with branch breakers, I like best having a 200A main breaker only panel for service entrance. I use Polaris to fan out to 100A and 200A panels and fused disconnects. I've got a lot of Square D QO boxes on my wall.