We start providing a quantitative stability theorem for the rigidity of an overdetermined problem involving harmonic functions in a punctured domain. Our approach is inspired by and based on the proof of rigidity established in Enciso and Peralta-Salas (Nonlinear Anal 70(2):1080–1086, 2009), and reveals essential differences with respect to the stability results obtained in the literature for the classical overdetermined Serrin problem. Secondly, we provide new weighted Poincaré-type inequalities for vector fields. These are crucial tools for the study of the quantitative stability issue initiated in Poggesi (Soap bubbles and convex cones: optimal quantitative rigidity, 2022. arXiv:2211.09429) concerning a class of rigidity results involving mixed boundary value problems. Finally, we provide a mean value-type property and an associated weighted Poincaré-type inequality for harmonic functions in cones. A duality relation between this new mean value property and a partially overdetermined boundary value problem is discussed, providing an extension of a classical result obtained in Payne and Schaefer (Math Methods Appl Sci 11(6):805–819, 1989).