In 7.2.1 SR3 we made an improvement with
DEV-7233 so that the Product Matrix Confirmation dialog (SaveProductMatrixDialog class) has a button down the bottom which is a toggle button paired with the Select All button. This new button is captioned "Just {0}" where {0} is the current part number.
The state is persisted, so if the user last selected "Just {0}" then the next time the dialog is shown it only selects the current part in the grid. Likewise, when "Select All" is selected, the next time the dialog is opened all parts are checked in the grid.
As SR3 was released way before your post (7.2.1 SR3 was released 6 Mar 2020) - I'm assuming you're using a version prior to that? If so, can you let us know what version that was - and maybe just upgrading them to SR3 or later will evaporate any need for a plugin?