Here is some more information regarding SPWebConfigModification class and code examples for adding and removing. More information: How to: Add and Remove Virtual Web.config Settings, http://msdn.microsoft.com/en-us/library/bb861909(v=office.14).aspx.
An alternative is creating a webconfig.myName.xml in de 12/CONFIG folder. These actions will be merged to all web applications in the farm. Manually pushing the actions is done by using stsadm.exe -o copyappbincontent. More information: How to: Create a Supplemental .config File, http://msdn.microsoft.com/en-us/library/ms439965.aspx.