Working method
For a rhythmic loop, mark the same beat in consecutive cycles. At 100 BPM four quarter notes span 2.4 seconds. For ambience, find similar stretches without distinctive events. Audition the wrap from end to start several times.
Listening checks and troubleshooting
If an ambience tail cuts off, lay a copy of the tail across the start and fade it in balance with the opening, retaining the original loop length. Test the export in a gapless player. A playback gap can mimic a fault in the file.
For an even ambience bed, adjust the crossfade curve by ear and inspect its midpoint.