I used to do what OP did with Firefox for the same reasons: sparing memory on a low-end system. The change has to be done in the "main" binary package, not in the packages that depends on it. Also as the package is changed, when keeping the same version, the dependency algorithm will prefer the repository source to the installed source, but won't do it for dependency reasons. It will just always write the package was kept and it won't be easily visible if the package is kept because there's a new version available but not installable, or because it's kept because there's the same version available. This can be worked around requires by slightly increasing the package version.
 There's no simple tool to do such change. Personally I edited directly the /var/lib/dpkg/status file which is the database of all installed packages. A mistake there could damage the whole system installation. Below is a longer but safe method: download the binary package, unpack it, edit it as needed and repack it into an alternate binary package and then install this.