That works. Some can be dusty, so be careful with that. Otherwise, no problem.
I'll let others chime in because I use paper substrate for cleanliness and ease and have enclosed Boaphile tanks (so humidity stays in fine).
However, if a BP can digest a whole rat, I don't think a little coconut substrate will hurt them.
It could annoy them if stuck in their mouth, but it sounds like it was just a jaw issue.
You are a new keeper, right? Sounds like you are doing a really good job and care about your BP! Great work!