Collecting a stack trace for any object, and storing that information with the object that simply isn't possible in an efficient manner.
Collecting stack trace information is expensive, and there is no way to do that "on scale", as part of normal program execution. Keep in mind that the primary purpose of stack traces is to collect that information after an exception occurred.
Beyond that, it is also conceptually wrong. If you only talk about very few specific objects, then the appropriate approach would be to carefully study the paths in your code that create these objects, and maybe have the code that creates objects do extensive logging. But if you really talk about many different sort of objects, then your request rather implies that the overall logging concept in your code is insufficient. Focus on that part then.