Humbuckers: Try putting foam rubber in the cavity below the bottom of the pickup. This will help the pickup from rocking back and forth. Try a stronger and longer height adjust spring. The compression springs are made in various gauges of spring steel and come in a variety sizes. Wear safety glasses when trying to put humbucker springs on. Be careful as the springs can shoot far from where your working. Covers that are used on humbuckers help keep the pickup snug when used with a mounting ring. Many players have removed the covers from their pickups looking for more output. Never use liquid foams, epoxies or glues to secure your pickup. If anything ever goes wrong with your pickup it will be quite difficult to repair and could cause considerable damage to your instrument.
Single Coils: I use a longer length of surgical rubber tubing when my single coil pickups are loose on pick guards or mounting plates. The rubber grommets can fatigue and flatten out especially in older instruments. Find a medical supply house and ask for 1/4" outside diameter, 1/8" inside diameter, amber surgical rubber tubing. You can cut it to any desired length you need and is pretty inexpensive. If you have a hard time finding it let me know and I'll help you find it. Covers should be used when ever possible to avoid your strings from getting snagged on the under edge of the pickup. Covers keep the pickup snug in the pick guard and protect the coils. If you have metal height adjust springs on your single coil pickups, replace them with the rubber grommets. If the springs are loose they can vibrate and cause an unusual feedback. In the early 60's I watched Jimi Hendrix pluck the tremolo springs in the back cavity of his Stratocaster. The cavity was cut deep enough to allow the tremolo springs (spring steel) vibration to react with the magnetic field of the pickups. He would pluck the springs and lower the tremolo arm and the rest is history.