For 1/4” jacks, I believe the right side of the Chase Bliss Mood is an always listening recorder that may partially achieve what you’re looking for. My experience with it is to play through it (not engaged) and when I’ve played something I want to loop, I engage it. I don’t recall what the buffer size is, but I don’t believe it’s very large, so you’d need to engage pretty quickly after realizing you want something looped. Not what you’re looking for per se, but an iteration.
Not 1/4” jacks, but 3.5mm: Mannequins w/ does this. I haven’t completely figured mine out so I can’t provide any tips, sorry. Lol
Edited to add:
This may seem very obvious but is worth pointing out: The most efficient way to achieve this would be a DAW and interface. I’m guessing you may not want to go this route, given your question, but it could be inexpensive and locating your samples would be easiest this way.
If my edit comes across as sarcastic, I can assure you it isn’t.
Sometimes the most obvious solution gets overlooked so I wanted to put this out there. I am very guilty of rushing towards a complicated solution because something obvious eluded my consideration.